/* ChronicleVault — base.css
   Reset, tokens, base typography */

:root {
  --color-dark: #0E4749;
  --color-dark-alt: #173F3D;
  --color-accent: #C7B77A;
  --color-bg: #E8DCC0;
  --color-text: #1E2620;
  --color-focus: #0E4749;

  --font-head: "Cormorant Garamond", Georgia, serif;
  --font-body: "Nunito Sans", -apple-system, Segoe UI, sans-serif;

  --container-max: 1140px;
  --space-mobile: 24px;
  --space-desktop: 48px;
}

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

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

body {
  margin: 0;
  background-color: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-body);
  font-weight: 400;
  line-height: 1.6;
  font-size: 1rem;
}

h1, h2, h3, h4 {
  font-family: var(--font-head);
  color: var(--color-dark);
  margin: 0 0 0.6em;
  line-height: 1.15;
}

h1 { font-weight: 700; font-size: clamp(2.4rem, 3vw + 1.4rem, 3rem); }
h2 { font-weight: 600; font-size: clamp(1.8rem, 1.6vw + 1.2rem, 2.2rem); }
h3 { font-weight: 600; font-size: 1.4rem; }

p, li, dd, td, th { max-width: 70ch; }

p { margin: 0 0 1.2em; }

a {
  color: var(--color-dark);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.15em;
}

a:hover { color: var(--color-dark-alt); }

img, svg { max-width: 100%; display: block; }

ul, ol { padding-left: 1.4em; }

table { border-collapse: collapse; width: 100%; }

button, select, input {
  font-family: inherit;
  font-size: 1rem;
}

.uppercase-label {
  font-family: var(--font-body);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  font-size: 0.82rem;
}

/* Focus visibility */
a:focus-visible,
button:focus-visible,
select:focus-visible,
summary:focus-visible,
[tabindex]:focus-visible,
input:focus-visible {
  outline: 2px solid var(--color-focus);
  outline-offset: 2px;
}

.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 {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--color-dark);
  color: var(--color-bg);
  padding: 0.6em 1em;
  z-index: 1000;
}

.skip-link:focus {
  left: 12px;
  top: 12px;
}

/* Ornamental divider — archival gazette style */
.ornament-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 2.4em 0;
  color: var(--color-accent);
}
.ornament-divider::before,
.ornament-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: linear-gradient(to right, transparent, var(--color-accent), transparent);
}
.ornament-divider svg { flex-shrink: 0; }

/* Aged-paper texture background (subtle, CSS-only) */
.paper-texture {
  background-color: var(--color-bg);
  background-image:
    repeating-linear-gradient(0deg, rgba(30,38,32,0.015) 0px, rgba(30,38,32,0.015) 1px, transparent 1px, transparent 3px),
    repeating-linear-gradient(90deg, rgba(30,38,32,0.01) 0px, rgba(30,38,32,0.01) 1px, transparent 1px, transparent 3px);
}

/* "ilustratif" badge */
.badge-ilustratif {
  display: inline-flex;
  align-items: center;
  gap: 0.3em;
  background: var(--color-accent);
  color: var(--color-dark);
  font-family: var(--font-body);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  font-size: 0.72rem;
  padding: 0.18em 0.55em;
  border-radius: 3px;
  cursor: help;
  border-bottom: 1px dotted var(--color-dark);
}

[hidden]{display:none!important}
