/* ═══════════════════════════════════════════
   BJF — Reset & Base
   ═══════════════════════════════════════════ */

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

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

body {
  font-family: var(--font-body);
  font-size: var(--text-md);
  font-weight: 400;
  line-height: 1.75;
  color: var(--bjf-text);
  background: var(--bjf-white);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ── Accessibility: Focus Styles ── */
:focus-visible {
  outline: 3px solid var(--bjf-focus);
  outline-offset: 3px;
  border-radius: var(--radius-sm);
}

:focus:not(:focus-visible) {
  outline: none;
}

/* ── Skip link for keyboard users ── */
.skip-link {
  position: absolute;
  top: -999px;
  left: 8px;
  background: var(--bjf-purple);
  color: var(--bjf-white);
  padding: 8px 16px;
  border-radius: 0 0 var(--radius-md) var(--radius-md);
  font-family: var(--font-body);
  font-weight: 600;
  font-size: var(--text-sm);
  text-decoration: none;
  z-index: 10000;
}
.skip-link:focus {
  top: 0;
}

/* ── Typography Base ── */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.2;
  color: var(--bjf-text);
}

h1 { font-size: clamp(2rem, 5vw, 3rem);    font-weight: 700; letter-spacing: -0.02em; }
h2 { font-size: clamp(1.6rem, 3.5vw, 2.4rem); font-weight: 700; letter-spacing: -0.02em; }
h3 { font-size: clamp(1.2rem, 2.5vw, 1.5rem); font-weight: 600; letter-spacing: -0.01em; }
h4 { font-size: var(--text-xl); font-weight: 600; letter-spacing: -0.01em; }
h5 { font-size: var(--text-lg); font-weight: 600; }
h6 { font-size: var(--text-base); font-weight: 600; }

p {
  font-size: var(--text-md);
  line-height: 1.75;
  color: var(--bjf-text-secondary);
  max-width: 68ch;
}

/* Centre-aligned contexts */
.text-center {
  text-align: center;
}

.text-center p {
  margin-left: auto;
  margin-right: auto;
}


/* Intro paragraph beneath centred section headings */
.section-intro {
  text-align: center;
  color: var(--bjf-text-muted);
  max-width: 50ch;
  margin: var(--space-3) auto 0;
  font-size: var(--text-base);
}

/* Light rule for dark backgrounds */
.section-rule--light {
  border-color: rgba(255,255,255,0.08);
}

a {
  color: var(--bjf-purple);
  text-decoration: underline;
  text-underline-offset: 3px;
  transition: color var(--transition-fast);
}

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

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

ul, ol {
  list-style: none;
}

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

input, textarea, select {
  font-family: var(--font-body);
}

/* ── Visually Hidden (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;
}

/* ── Layout Utilities ── */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--space-10);
}

.container--narrow {
  max-width: var(--max-width-text);
  margin: 0 auto;
  padding: 0 var(--space-10);
}

.section-padding {
  padding: var(--space-24) 0;
}

.section-padding--lg {
  padding: calc(var(--space-24) * 1.5) 0;
}

.section-padding--sm {
  padding: var(--space-16) 0;
}


.section-title {
  margin-bottom: var(--space-4);
  color: var(--bjf-text);
}

.section-body {
  font-size: var(--text-lg);
  line-height: 1.75;
  color: var(--bjf-text-secondary);
  max-width: var(--max-width-text);
}

.section-divider {
  width: 40px;
  height: 3px;
  background: linear-gradient(90deg, var(--bjf-violet), var(--bjf-cerise));
  border-radius: var(--radius-pill);
  margin: var(--space-5) 0;
}

/* ── Text Colour Helpers ── */
.text-purple { color: var(--bjf-purple); }
.text-white  { color: var(--bjf-white); }
.text-muted  { color: var(--bjf-text-muted); }

/* ── Background Helpers ── */
.bg-white  { background: var(--bjf-white); }
.bg-cream  { background: var(--bjf-cream); }
.bg-warm   { background: var(--bjf-warm); }
.bg-purple { background: var(--bjf-purple); }
.bg-deep   { background: var(--bjf-purple-deep); }

/* ── WCAG AA: minimum contrast ── */
/* text-secondary on white: #4A3D58 — contrast 6.1:1 ✓ */
/* text-muted on white: #7A6B8A — contrast 4.6:1 ✓      */
/* white on purple #5B2B8A: contrast 7.2:1 ✓             */

/* ── Decorative Divider ── */
hr.section-rule {
  border: none;
  border-top: 1px solid var(--bjf-border);
  margin: 0;
}
