:root {
  color-scheme: light dark;
  --background: #f8f5ef;
  --surface: #fffdf9;
  --text: #17263d;
  --muted: #687080;
  --accent: #c99a3d;
  --accent-soft: #f2e6ca;
  --border: #e6e0d6;
  --link: #456d91;
  --header: #17263d;
  --header-text: #fffaf0;
  --focus: #d99a7b;
}

@media (prefers-color-scheme: dark) {
  :root {
    --background: #111927;
    --surface: #182335;
    --text: #f5f0e7;
    --muted: #bdc6d2;
    --accent: #dfb65f;
    --accent-soft: #302b22;
    --border: #344258;
    --link: #9fc4e2;
    --header: #0b1422;
    --header-text: #fffaf0;
    --focus: #e6a98a;
  }
}

* { box-sizing: border-box; }

html {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 100%;
  line-height: 1.65;
  background: var(--background);
  color: var(--text);
}

body { margin: 0; min-width: 280px; }

a { color: var(--link); text-underline-offset: 0.18em; }
a:hover { text-decoration-thickness: 0.14em; }
a:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 4px;
  border-radius: 3px;
}

.site-header { background: var(--header); color: var(--header-text); }
.header-inner, main, .footer-inner {
  width: min(100% - 2rem, 72rem);
  margin-inline: auto;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem;
  padding-block: 1rem;
}

.brand {
  color: inherit;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(1.45rem, 4vw, 1.9rem);
  font-weight: 700;
  letter-spacing: 0.01em;
  text-decoration: none;
  white-space: nowrap;
}

nav ul { display: flex; flex-wrap: wrap; gap: 0.45rem 1.1rem; margin: 0; padding: 0; list-style: none; }
nav a { color: var(--header-text); font-weight: 600; text-decoration: none; }
nav a[aria-current="page"] { color: var(--accent); text-decoration: underline; }

main { padding-block: clamp(2.25rem, 7vw, 5rem); }
.hero { max-width: 48rem; padding-block: clamp(1rem, 4vw, 3rem); }
.eyebrow { margin: 0 0 0.7rem; color: var(--accent); font-weight: 750; letter-spacing: 0.06em; text-transform: uppercase; }
h1, h2, h3 { line-height: 1.24; color: var(--text); }
h1 { margin: 0 0 1.1rem; font-family: Georgia, "Times New Roman", serif; font-size: clamp(2.25rem, 8vw, 4.6rem); }
h2 { margin: 2.4rem 0 0.7rem; font-size: clamp(1.35rem, 4vw, 1.75rem); }
h3 { margin: 1.7rem 0 0.45rem; font-size: 1.1rem; }
p, ul, ol { max-width: 70ch; }
.lead { font-size: clamp(1.08rem, 2.4vw, 1.3rem); color: var(--muted); }
.meta { color: var(--muted); font-size: 0.94rem; }

.link-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
  margin-block: 2.5rem;
}
.link-card {
  display: block;
  min-height: 9rem;
  padding: 1.25rem;
  border: 1px solid var(--border);
  border-radius: 1.1rem;
  background: var(--surface);
  color: var(--text);
  text-decoration: none;
}
.link-card strong { display: block; margin-bottom: 0.45rem; font-size: 1.08rem; }
.link-card span { color: var(--muted); }
.notice {
  margin-block: 2rem;
  padding: 1rem 1.15rem;
  border-inline-start: 4px solid var(--accent);
  border-radius: 0.4rem;
  background: var(--accent-soft);
}
.legal { max-width: 50rem; }
.legal h1 { font-size: clamp(2rem, 6vw, 3.5rem); }
.legal li + li { margin-top: 0.35rem; }
.contact-box {
  margin-block: 2rem;
  padding: 1.25rem;
  border: 1px solid var(--border);
  border-radius: 1rem;
  background: var(--surface);
}
.site-footer { border-top: 1px solid var(--border); }
.footer-inner { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 0.7rem 1.5rem; padding-block: 1.4rem 2rem; color: var(--muted); font-size: 0.92rem; }
.footer-inner p { margin: 0; }

@media (max-width: 46rem) {
  .header-inner { align-items: flex-start; flex-direction: column; }
  .link-grid { grid-template-columns: 1fr; }
  .link-card { min-height: auto; }
}

@media (prefers-reduced-motion: reduce) { *, *::before, *::after { scroll-behavior: auto !important; } }
