/* base.css — element defaults and the page container. */

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

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--ev-bg);
  color: var(--ev-fg);
  font-family: var(--ev-font-body);
  font-size: var(--ev-t6);
  line-height: 1.6;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* The single container. Every section uses it so the 1200px measure and
   the gutter are defined in exactly one place. */
.ev-wrap {
  width: 100%;
  max-width: var(--ev-maxw);
  margin-inline: auto;
  padding-inline: var(--ev-s3);
}

@media (min-width: 768px) {
  .ev-wrap { padding-inline: var(--ev-s5); }
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--ev-font-display);
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -0.02em;
  color: var(--ev-fg);
  margin: 0 0 var(--ev-s3);
  text-wrap: balance;
}

h1 { font-size: var(--ev-t1); font-weight: 800; }
h2 { font-size: var(--ev-t2); }
h3 { font-size: var(--ev-t3); }
h4 { font-size: var(--ev-t4); }
h5 { font-size: var(--ev-t5); }
h6 { font-size: var(--ev-t6); }

p {
  margin: 0 0 var(--ev-s3);
  max-width: var(--ev-measure);
}

/* Lede — the one paragraph allowed to sit above body size. */
.ev-lede {
  font-size: var(--ev-t5);
  line-height: 1.5;
  color: var(--ev-muted);
  max-width: 58ch;
}

a {
  color: var(--ev-accent);
  text-decoration: underline;
  text-underline-offset: 0.18em;
  text-decoration-thickness: 1px;
  transition: color var(--ev-dur-fast) ease-in-out;
}

a:hover { text-decoration-thickness: 2px; }

/* Visible focus for keyboard users. Astra's default focus ring is faint;
   this replaces it. Required for WCAG 2.2 AA (2.4.11 Focus Not Obscured
   and 2.4.13 Focus Appearance). */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible,
[tabindex]:focus-visible {
  outline: 2px solid var(--ev-accent);
  outline-offset: 3px;
  border-radius: var(--ev-r-sm);
}

ul, ol {
  margin: 0 0 var(--ev-s3);
  padding-left: var(--ev-s3);
  max-width: var(--ev-measure);
}

li { margin-bottom: var(--ev-s1); }

strong { font-weight: 600; }

code, kbd, samp {
  font-family: var(--ev-font-mono);
  font-size: 0.9em;
  background: var(--ev-card);
  border: 1px solid var(--ev-rule);
  border-radius: var(--ev-r-sm);
  padding: 0.1em 0.35em;
}

img, svg, video { max-width: 100%; height: auto; }

hr {
  border: 0;
  border-top: 1px solid var(--ev-rule);
  margin: var(--ev-s6) 0;
}

/* Skip link — hidden until keyboard-focused. Required for WCAG 2.4.1. */
.ev-skip {
  position: absolute;
  left: var(--ev-s2);
  top: var(--ev-s2);
  z-index: 999;
  transform: translateY(-200%);
  background: var(--ev-fg);
  color: var(--ev-bg);
  padding: var(--ev-s1) var(--ev-s2);
  border-radius: var(--ev-r-md);
  text-decoration: none;
  font-family: var(--ev-font-mono);
  font-size: var(--ev-t8);
  text-transform: uppercase;
  letter-spacing: 0.14em;
  transition: transform var(--ev-dur-fast) ease-out;
}

.ev-skip:focus { transform: translateY(0); }
