/* ================================================================
   BASE — Reset, root HTML elements, typography scale
   WP equivalent: style.css base rules
   ================================================================ */

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

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

body {
  font-family: var(--font-body);
  font-size: var(--fs-body);
  font-weight: var(--fw-regular);
  line-height: var(--lh-normal);
  color: var(--color-text-dark);
  background-color: var(--color-bg-white);
  overflow-x: hidden;
}

/* ── Skip-nav (accessibility) ── */
.skip-link {
  position: absolute;
  top: -100%;
  left: var(--sp-4);
  background: var(--color-primary);
  color: var(--color-text-light);
  padding: var(--sp-2) var(--sp-5);
  border-radius: 0 0 var(--r-md) var(--r-md);
  font-weight: var(--fw-bold);
  text-decoration: none;
  z-index: var(--z-toast);
  transition: top var(--t-base);
}
.skip-link:focus { top: 0; }

/* ── Headings ── */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: var(--fw-bold);
  line-height: var(--lh-tight);
  color: inherit;
}
h1 { font-size: var(--fs-h1); }
h2 { font-size: var(--fs-h2); }
h3 { font-size: var(--fs-h3); }
h4 { font-size: var(--fs-h4); }

/* ── Body text ── */
p  { line-height: var(--lh-normal); margin-bottom: var(--sp-4); }
p:last-child { margin-bottom: 0; }
strong { font-weight: var(--fw-bold); }
em     { font-style: italic; }

/* ── Links ── */
a {
  color: var(--color-primary);
  text-decoration: none;
  transition: color var(--t-fast);
}
a:hover, a:focus-visible { color: var(--color-primary-dark); text-decoration: underline; }
a:focus-visible {
  outline: 3px solid var(--c-gold);
  outline-offset: 3px;
  border-radius: var(--r-sm);
}

/* ── Lists ── */
ul, ol { padding-left: var(--sp-5); }
li { margin-bottom: var(--sp-2); }

/* ── Images ── */
img, video {
  display: block;
  max-width: 100%;
  height: auto;
}

/* ── Horizontal rule ── */
hr {
  border: none;
  border-top: 1px solid var(--color-border);
  margin: var(--sp-7) 0;
}

/* ── Selection ── */
::selection {
  background: var(--c-gold);
  color: var(--c-dark-1);
}

/* ── Scrollbar (Webkit) ── */
::-webkit-scrollbar          { width: 8px; }
::-webkit-scrollbar-track    { background: var(--c-dark-2); }
::-webkit-scrollbar-thumb    { background: var(--c-terra); border-radius: var(--r-full); }
::-webkit-scrollbar-thumb:hover { background: var(--c-terra-mid); }

/* ── Focus ring (global) ── */
:focus-visible {
  outline: 3px solid var(--c-gold);
  outline-offset: 2px;
}
