/**
 * base.css
 * ─────────────────────────────────────────────────────
 * CSS reset + global base styles.
 * No component-specific styles here — only foundational rules.
 */

/* ── Reset ────────────────────────────────────────────── */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  font-size: 100%; /* 16px base */
}

body {
  font-family: var(--font-body);
  font-size: var(--fs-base);
  font-weight: var(--fw-normal);
  color: var(--clr-text);
  background-color: var(--clr-bg);
  line-height: var(--lh-normal);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ── Typography ───────────────────────────────────────── */
h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: var(--font-display);
  font-weight: var(--fw-medium);
  line-height: var(--lh-tight);
  color: var(--clr-primary);
}

h1 {
  font-size: var(--fs-hero);
}
h2 {
  font-size: var(--fs-2xl);
}
h3 {
  font-size: var(--fs-xl);
}
h4 {
  font-size: var(--fs-lg);
}
h5 {
  font-size: var(--fs-md);
}
h6 {
  font-size: var(--fs-base);
}

p {
  color: var(--clr-text-muted);
  line-height: var(--lh-relaxed);
}

a {
  color: inherit;
  text-decoration: none;
}

/* ── Media ────────────────────────────────────────────── */
img,
picture,
video,
canvas {
  display: block;
  max-width: 100%;
}

img {
  height: auto;
}

/* ── Forms ────────────────────────────────────────────── */
button,
input,
select,
textarea {
  font-family: inherit;
  font-size: inherit;
}

button {
  cursor: pointer;
  border: none;
  background: transparent;
}

ul,
ol {
  list-style: none;
}

/* ── Tables ───────────────────────────────────────────── */
table {
  border-collapse: collapse;
  width: 100%;
}

/* ── Accessibility ────────────────────────────────────── */
.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;
}

:focus-visible {
  outline: 2px solid var(--clr-accent);
  outline-offset: 3px;
  border-radius: var(--radius-xs);
}

/* ── Selection ────────────────────────────────────────── */
::selection {
  background-color: var(--clr-accent-light);
  color: var(--clr-primary);
}

/* ── Horizontal Rule ──────────────────────────────────── */
hr {
  border: none;
  height: 1px;
  background: var(--clr-border);
}

/* ── Blockquote ───────────────────────────────────────── */
blockquote {
  font-family: var(--font-display);
  font-style: italic;
  font-size: var(--fs-md);
  color: var(--clr-primary);
  line-height: var(--lh-snug);
}

/* ── Prose (rich text from admin editor) ─────────────── */
.prose p {
  margin-bottom: 1rem;
  color: var(--clr-text-muted);
}
.prose h2 {
  margin: 2rem 0 1rem;
}
.prose h3 {
  margin: 1.5rem 0 0.75rem;
}
.prose ul,
.prose ol {
  margin: 1rem 0 1rem 1.5rem;
}
.prose ul {
  list-style: disc;
}
.prose ol {
  list-style: decimal;
}
.prose li {
  margin-bottom: 0.5rem;
  color: var(--clr-text-muted);
  line-height: var(--lh-relaxed);
}
.prose a {
  color: var(--clr-primary-mid);
  text-decoration: underline;
}
.prose a:hover {
  color: var(--clr-accent-dark);
}
.prose strong {
  font-weight: var(--fw-semi);
  color: var(--clr-text);
}
.prose em {
  font-style: italic;
}
.prose img {
  border-radius: var(--radius-md);
  margin: 1.5rem 0;
}
.prose blockquote {
  border-left: 3px solid var(--clr-accent);
  padding-left: 1rem;
  margin: 1.5rem 0;
}
.prose pre {
  background: var(--clr-bg-alt);
  padding: 1rem;
  border-radius: var(--radius-md);
  overflow-x: auto;
  font-size: var(--fs-sm);
}
