/* ============================================================
   Self-hosted fonts + base element styles
   ============================================================ */

/* Inter — variable, all weights in one file (Latin) */
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url('../fonts/inter-latin.woff2') format('woff2-variations');
}

/* Newsreader — variable opsz + wght, roman */
@font-face {
  font-family: 'Newsreader';
  font-style: normal;
  font-weight: 200 800;
  font-display: swap;
  src: url('../fonts/newsreader-roman-latin.woff2') format('woff2-variations');
}

/* Newsreader — variable opsz + wght, italic */
@font-face {
  font-family: 'Newsreader';
  font-style: italic;
  font-weight: 200 800;
  font-display: swap;
  src: url('../fonts/newsreader-italic-latin.woff2') format('woff2-variations');
}

/* JetBrains Mono */
@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('../fonts/jetbrains-mono-latin.woff2') format('woff2');
}

/* ============================================================
   Element defaults
   ============================================================ */

html, body {
  background: var(--ink);
  color: var(--bone);
}

body {
  font-family: var(--font-body);
  font-size: var(--text-base);
  line-height: 1.6;
  font-weight: 400;
  font-feature-settings: "ss01", "cv11"; /* Inter alt single-storey g, etc. */
  text-rendering: optimizeLegibility;
}

/* Headings */
h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 400;
  letter-spacing: -0.015em;
  line-height: 1.05;
  font-optical-sizing: auto;
}

h1 {
  font-size: var(--text-4xl);
  line-height: 0.95;
  letter-spacing: -0.02em;
}

h2 { font-size: var(--text-2xl); }
h3 { font-size: var(--text-xl); }
h4 {
  font-size: var(--text-lg);
  letter-spacing: 0;
}

h1 em, h2 em, h3 em {
  font-style: italic;
  font-weight: 400;
}

/* Body */
p {
  font-size: var(--text-base);
  line-height: 1.65;
  max-width: 65ch;
}

a {
  color: inherit;
  text-decoration: underline;
  text-decoration-color: color-mix(in srgb, currentColor 30%, transparent);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
  transition: text-decoration-color var(--transition), color var(--transition);
}
a:hover {
  text-decoration-color: currentColor;
}

strong, b { font-weight: 600; }
em, i { font-style: italic; }

small { font-size: var(--text-sm); color: var(--bone-muted); }

/* Lists in body copy */
ul, ol {
  padding-left: 1.25em;
}
li + li { margin-top: 0.25em; }

/* Mono / spec text */
code, kbd, samp, pre {
  font-family: var(--font-mono);
  font-size: 0.9em;
}

/* Hairline */
hr {
  border: 0;
  border-top: var(--rule-width) solid var(--rule);
  margin: 0;
}

/* Selection */
::selection {
  background: var(--oxblood);
  color: var(--bone);
}

/* Visually hidden */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Skip link */
.skip-link {
  position: absolute;
  top: -100px;
  left: 1rem;
  background: var(--bone);
  color: var(--ink);
  padding: 0.5rem 1rem;
  z-index: 1000;
  border-radius: var(--radius);
  font-weight: 500;
  transition: top var(--transition);
}
.skip-link:focus {
  top: 1rem;
}

/* Honeypot field — hidden from real users (visually + from screen
 * readers) but present in the DOM for bots to auto-fill. The
 * Worker silently drops any submission where this field is non-empty.
 */
.hp-field {
  position: absolute !important;
  left: -9999px !important;
  width: 1px !important;
  height: 1px !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

/* Reusable text utilities */
.eyebrow {
  font-family: var(--font-body);
  font-size: var(--text-xs);
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--bone-muted);
}

.spec {
  font-family: var(--font-mono);
  font-size: var(--text-sm);
  letter-spacing: 0.04em;
  color: var(--bone-muted);
  text-transform: uppercase;
}

.muted { color: var(--bone-muted); }

.lede {
  font-size: var(--text-lg);
  line-height: 1.55;
  max-width: 60ch;
}
