/* Aquinas site. Plain CSS, no build step. Fonts: Source Serif 4 and Inter (Google Fonts). */
:root {
  --bg: #ffffff;
  --fg: #1c1b1a;
  --muted: #5e5b57;
  --rule: #e4e0da;
  --surface: #f7f5f1;
  --red: #b3261e;
  --link: #b3261e;
  --serif: "Source Serif 4", Georgia, "Times New Roman", serif;
  --sans: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #121110;
    --fg: #ece8e2;
    --muted: #a9a49c;
    --rule: #2e2c29;
    --surface: #1a1918;
    --red: #b3261e;
    --link: #ee7a72;
  }
}

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

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--serif);
  font-size: 1.125rem;
  line-height: 1.65;
}

.wrap {
  width: 100%;
  max-width: 42rem;
  margin: 0 auto;
  padding: 0 1rem;
}

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

.skip {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--bg);
  padding: 0.5rem 1rem;
  z-index: 10;
}
.skip:focus { left: 0; }

/* Header and footer */
.site-header { border-bottom: 1px solid var(--rule); }
.site-header .wrap {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  padding-top: 1rem;
  padding-bottom: 1rem;
}
.wordmark {
  font-family: var(--serif);
  font-weight: 600;
  font-size: 1.25rem;
  letter-spacing: 0.04em;
  color: var(--fg);
  text-decoration: none;
}
.site-header nav a, .site-footer nav a {
  font-family: var(--sans);
  font-size: 0.9375rem;
  color: var(--muted);
  text-decoration: none;
  margin-left: 1.25rem;
}
.site-header nav a:hover, .site-footer nav a:hover { color: var(--link); text-decoration: underline; }

.site-footer {
  border-top: 1px solid var(--rule);
  margin-top: 4rem;
  padding: 2rem 0 3rem;
  font-family: var(--sans);
}
.site-footer nav a { margin: 0 1.25rem 0 0; }
.foot-name { font-family: var(--serif); font-weight: 600; margin: 0 0 0.5rem; }
.small { font-size: 0.875rem; color: var(--muted); margin: 0.75rem 0 0; line-height: 1.5; }

/* Headings */
h1, h2 { font-family: var(--serif); line-height: 1.2; font-weight: 600; }
h1 { font-size: 2.25rem; margin: 2.5rem 0 0.75rem; }
h2 { font-size: 1.375rem; margin: 2.25rem 0 0.5rem; }
p, ul, ol { margin: 0 0 1rem; }
li { margin-bottom: 0.4rem; }

/* Home */
.hero { padding: 3rem 0 2rem; }
.hero h1 { font-size: 3.5rem; letter-spacing: 0.02em; margin: 0.25rem 0 1rem; }
.eyebrow {
  font-family: var(--sans);
  font-size: 0.8125rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--red);
  margin: 0;
}
@media (prefers-color-scheme: dark) { .eyebrow { color: var(--link); } }
.lead { font-size: 1.375rem; line-height: 1.5; }

.features { border-top: 1px solid var(--rule); margin-top: 1rem; }
.features article { padding: 1.5rem 0; border-bottom: 1px solid var(--rule); }
.features h2 { margin-top: 0; }
.features p { margin: 0; }

.quiet { font-style: italic; color: var(--muted); padding: 1.5rem 0 0; }

.store {
  background: var(--surface);
  border-left: 4px solid var(--red);
  padding: 1.25rem 1.5rem;
  margin-top: 2.5rem;
}
.store h2 { margin-top: 0; }
.store p:last-child { margin-bottom: 0; }

/* Document pages */
.doc h1 { margin-top: 2rem; }
.meta { font-family: var(--sans); font-size: 0.9375rem; color: var(--muted); }
.doc h2 { border-top: 1px solid var(--rule); padding-top: 1.25rem; }
.doc h2:first-of-type { border-top: 0; }
.terms > li { margin-bottom: 1rem; padding-left: 0.25rem; }
.terms ul { margin-top: 0.5rem; }

/* Support */
.contact {
  font-family: var(--sans);
  font-size: 1.125rem;
  border-left: 4px solid var(--red);
  padding: 0.5rem 1rem;
  background: var(--surface);
}
details { border-bottom: 1px solid var(--rule); padding: 0.25rem 0; }
details:first-of-type { border-top: 1px solid var(--rule); }
summary {
  cursor: pointer;
  font-family: var(--sans);
  font-weight: 500;
  font-size: 1rem;
  padding: 0.75rem 0;
}
details p { color: var(--fg); margin: 0 0 1rem; }

@media (max-width: 30rem) {
  body { font-size: 1.0625rem; }
  .hero h1 { font-size: 2.75rem; }
  h1 { font-size: 1.875rem; }
  .lead { font-size: 1.1875rem; }
}

@media (prefers-reduced-motion: reduce) {
  * { scroll-behavior: auto !important; transition: none !important; }
}
