/**
 * main.css
 * ─────────────────────────────────────────────────────────────────
 * Global base styles: CSS reset, html/body defaults, plain-element
 * typography (h3, h4, p), scrollbar, text selection, accessibility
 * helpers (skip-link, focus-visible), and the section divider.
 *
 * Intentionally contains NO class-based components — those live in
 * components.css. Intentionally contains NO layout — that lives in
 * layout.css.
 */

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

/* ── HTML root ────────────────────────────────────── */
html {
  scroll-behavior: smooth;
  font-size: 16px;
}

/* ── Body ─────────────────────────────────────────── */
body {
  font-family: 'DM Sans', 'Inter', system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
  display: flex;
  min-height: 100vh;
}

/* ── Text selection ───────────────────────────────── */
::selection {
  background: rgba(139, 105, 20, 0.22);
}

/* ── Custom scrollbar ─────────────────────────────── */
::-webkit-scrollbar        { width: 6px; }
::-webkit-scrollbar-track  { background: var(--bg); }
::-webkit-scrollbar-thumb  { background: var(--surface3); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--accent); }

/* ── Typography: subsection headings ─────────────── */
h3 {
  font-size: 16px;
  font-weight: 600;
  color: var(--text);
  margin: 36px 0 16px;
  display: flex;
  align-items: center;
  gap: 10px;
}

/* Colored vertical bar before each h3 */
h3::before {
  content: '';
  width: 3px;
  height: 18px;
  background: linear-gradient(var(--accent), var(--accent2));
  border-radius: 2px;
  flex-shrink: 0;
}

h4 {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin: 28px 0 12px;
}

/* Sub-section heading: same visual language as h3 but smaller and indented */
h3.h3-sub {
  font-size: 14px;
  margin-top: 28px;
  margin-left: 18px;
}

h3.h3-sub::before {
  width: 2px;
  height: 14px;
  opacity: 0.75;
}

p {
  color: var(--text-muted);
  font-size: 14.5px;
  margin-bottom: 16px;
}

/* ── Horizontal rule / section divider ───────────── */
.divider {
  border: none;
  border-top: 1px solid var(--border-soft);
  margin: 48px 0;
}

/* ── Accessibility: skip-to-content link ─────────── */
/* Visible only on keyboard focus — screen readers and tab navigation */
.skip-link {
  position: absolute;
  top: -100px;
  left: 24px;
  background: var(--accent);
  color: #fff;
  padding: 8px 16px;
  border-radius: 0 0 6px 6px;
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  z-index: 1000;
  transition: top 0.2s;
}

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

/* ── Focus visible (keyboard navigation ring) ─────── */
/* Use :focus-visible instead of :focus to avoid ring on mouse clicks */
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 3px;
}
