/* Vesica — vesicabible.com
   A book page, not a web page: pearl paper, ink, one sea-glass accent, hairline rules and
   generous margins. Light and dark follow the reader's system setting. */

:root {
  color-scheme: light dark;
  --page: #FAF7F2;          /* Pearl */
  --ink: #1C2230;
  --ink-secondary: #454C59;
  --ink-tertiary: #5A616D;
  --rule: #E3DDD3;
  --accent: #336468;        /* sea-glass, deepened for text contrast */
  --measure: 34rem;
  --gutter: 1.25rem;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --page: #131A23;        /* Night Sea */
    --ink: #E3E0D8;
    --ink-secondary: #A7AEB6;
    --ink-tertiary: #8F98A2;
    --rule: #28323D;
    --accent: #8DBDB9;
  }
}

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

html {
  background: var(--page);
  color: var(--ink);
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--page);
  font-family: var(--serif);
  font-size: 1.125rem;
  line-height: 1.6;
  font-kerning: normal;
  font-variant-ligatures: common-ligatures;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  overflow-wrap: break-word;   /* long addresses never push the page sideways on phones */
}

/* Layout: one centred column with a comfortable measure. */
.masthead,
main,
.colophon {
  max-width: calc(var(--measure) + 2 * var(--gutter));
  margin: 0 auto;
  padding: 0 var(--gutter);
}

/* Masthead: the name in spaced small capitals, nothing else. */
.masthead {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 2rem;
  padding-bottom: 2rem;
}

.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  color: var(--ink);
  text-decoration: none;
  font-size: 0.8rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}

.wordmark img {
  width: 28px;
  height: 28px;
  border-radius: 22.37%;
}

main { padding-bottom: 4rem; }

/* Type */
h1,
h2,
h3 {
  font-weight: normal;
  line-height: 1.25;
  margin: 0;
}

h1 {
  font-size: 2.25rem;
  letter-spacing: 0.01em;
  margin-bottom: 0.75rem;
}

h2 {
  font-size: 1.3rem;
  margin-top: 2.75rem;
  margin-bottom: 0.6rem;
}

h3 {
  font-size: 1.075rem;
  font-style: italic;
  margin-top: 1.75rem;
  margin-bottom: 0.35rem;
}

p { margin: 0 0 1.1rem; }

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

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

a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 2px;
}

strong { font-weight: 600; }

.secondary,
.lede { color: var(--ink-secondary); }

.small {
  font-size: 0.9rem;
  color: var(--ink-tertiary);
}

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

/* Running label above a page title, like a book's running head. */
.label {
  font-size: 0.75rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-tertiary);
  margin-bottom: 0.5rem;
}

/* Home page opening */
.opening {
  text-align: center;
  padding: 2.5rem 0 1rem;
}

.app-icon {
  display: block;
  width: 112px;
  height: 112px;
  margin: 0 auto 1.75rem;
  border-radius: 22.37%;
}

.lede {
  font-size: 1.3rem;
  font-style: italic;
  margin-bottom: 2rem;
}

.epigraph {
  font-style: italic;
  color: var(--ink-secondary);
  margin: 0 auto 0.25rem;
  max-width: 26rem;
}

.epigraph-source {
  font-size: 0.8rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-tertiary);
}

/* Short facts, set as a quiet list with hairlines between items. */
.facts {
  list-style: none;
  margin: 0 0 2rem;
  padding: 0;
}

.facts li {
  padding: 0.85rem 0;
  border-top: 1px solid var(--rule);
}

.facts li:last-child { border-bottom: 1px solid var(--rule); }

/* FAQ */
.faq h3 { font-style: normal; font-weight: 600; font-size: 1.05rem; }

/* Credits */
.credit {
  padding: 1.1rem 0;
  border-top: 1px solid var(--rule);
}

.credit:last-of-type { border-bottom: 1px solid var(--rule); }

.credit h3 {
  margin: 0 0 0.25rem;
  font-style: normal;
}

.credit .licence {
  font-size: 0.75rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.4rem;
}

.credit p {
  font-size: 0.95rem;
  color: var(--ink-secondary);
  margin-bottom: 0.4rem;
}

.credit p:last-child { margin-bottom: 0; }

/* Footer */
.colophon {
  padding-top: 1.5rem;
  padding-bottom: 3rem;
  border-top: 1px solid var(--rule);
  font-size: 0.9rem;
  color: var(--ink-tertiary);
}

.colophon nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1.5rem;
  margin-bottom: 0.75rem;
}

.colophon a { color: var(--ink-secondary); }

.colophon a[aria-current="page"] {
  color: var(--ink);
  text-decoration: none;
}

/* Narrow phones: a little less air, never horizontal scroll. */
@media (max-width: 420px) {
  body { font-size: 1.0625rem; }
  h1 { font-size: 2rem; }
  .masthead { padding-top: 1.25rem; padding-bottom: 1.25rem; }
  .opening { padding-top: 1.5rem; }
}

@media print {
  :root { --page: #fff; --ink: #000; --ink-secondary: #333; --ink-tertiary: #555; --rule: #ccc; --accent: #000; }
  .masthead, .colophon nav { display: none; }
}
