/* Pastor Bengts heliga skrifter: pergament, IM Fell English och EB Garamond. */

@font-face { font-family: "IM Fell English"; font-style: normal; font-weight: 400; font-display: swap; src: url("typsnitt/im-fell-english.woff2") format("woff2"); }
@font-face { font-family: "IM Fell English"; font-style: italic; font-weight: 400; font-display: swap; src: url("typsnitt/im-fell-english-kursiv.woff2") format("woff2"); }
@font-face { font-family: "EB Garamond"; font-style: normal; font-weight: 400 500; font-display: swap; src: url("typsnitt/eb-garamond.woff2") format("woff2"); }
@font-face { font-family: "EB Garamond"; font-style: italic; font-weight: 400; font-display: swap; src: url("typsnitt/eb-garamond-kursiv.woff2") format("woff2"); }

:root {
  --pergament: #EFE4CC;
  --blad: #F7F0DF;
  --bläck: #2B2118;
  --brun: #5A4A33;
  --blek: #6B5A3E;
  --rött: #8E2A1E;
  --mörkrött: #5E1A12;
  --linje: #B9A57E;
  --ram: #C9B78F;
  --spår: #D9CBA9;
  --fell: "IM Fell English", Georgia, serif;
}

* { box-sizing: border-box; }
html { background: var(--pergament); }
body {
  margin: 0;
  color: var(--bläck);
  font-family: "EB Garamond", Georgia, serif;
  font-size: 1.2rem;
  line-height: 1.6;
  -webkit-text-size-adjust: 100%;
}
a { color: var(--rött); text-underline-offset: .15em; }
a:hover { color: var(--mörkrött); }
:focus-visible { outline: 2px solid var(--rött); outline-offset: 3px; }
p { margin: 0; }
h1, h2, h3 { font-family: var(--fell); font-weight: 400; margin: 0; text-wrap: balance; }

.sida { max-width: 1040px; margin: 0 auto; padding: 3rem 1.5rem 5rem; }

/* Sidhuvud */
.huvud { text-align: center; display: flex; flex-direction: column; align-items: center; gap: .5rem; padding-bottom: 2rem; border-bottom: 1px solid var(--linje); }
.huvud h1 { font-size: clamp(2.6rem, 7vw, 5rem); line-height: 1.05; }
.huvud h1 a { color: inherit; text-decoration: none; }
.huvud .undertext { font-style: italic; color: var(--brun); max-width: 34rem; }
.huvud.liten h1 { font-size: clamp(2rem, 5vw, 3rem); }
.överrad { font-family: var(--fell); font-style: italic; letter-spacing: .2em; text-transform: uppercase; font-size: .85rem; color: var(--blek); }
.meny { display: flex; flex-wrap: wrap; justify-content: center; gap: .25rem 2rem; margin-top: 1rem; font-family: var(--fell); font-size: 1.1rem; }
.meny a { text-decoration: none; }
.meny a[aria-current="page"] { text-decoration: underline; }

/* Spalter */
.spalter { display: flex; flex-wrap: wrap; gap: 3rem; padding-top: 3rem; }
.huvudspalt { flex: 999 1 560px; min-width: 0; display: flex; flex-direction: column; gap: 3.5rem; }
.sidospalt { flex: 1 1 280px; min-width: 0; display: flex; flex-direction: column; gap: 1.25rem; }
.ensam { max-width: 44rem; margin: 0 auto; padding-top: 3rem; display: flex; flex-direction: column; gap: 3.5rem; }

/* Text */
.text { display: flex; flex-direction: column; gap: .9rem; }
.anfang::first-letter { font-family: var(--fell); float: left; font-size: 5.2em; line-height: .82; padding: 6px 12px 0 0; color: var(--rött); }
.datum { font-family: var(--fell); font-style: italic; color: var(--rött); }
.signatur { text-align: right; font-family: var(--fell); font-style: italic; }
.inledning { font-style: italic; color: var(--brun); }
.liten-text { font-size: 1rem; }
.mjuk { color: var(--brun); }

article h2 { font-size: clamp(1.9rem, 4vw, 2.4rem); line-height: 1.15; }

/* Skriften: dubbel ram, kapitel och verser */
.kapitel { display: flex; flex-direction: column; gap: 1rem; padding: clamp(1.25rem, 4vw, 2.5rem); background: var(--blad); border: 1px solid var(--ram); outline: 1px solid var(--ram); outline-offset: 6px; margin: 6px; }
.kapitel .caput { text-align: center; font-family: var(--fell); letter-spacing: .3em; color: var(--rött); }
.kapitel h2 { text-align: center; font-size: clamp(1.6rem, 4vw, 2rem); line-height: 1.2; }
.kapitel .när { text-align: center; font-style: italic; color: var(--blek); font-size: 1rem; }
.vers-nr { color: var(--rött); font-family: var(--fell); margin-right: .2em; }
.kapitel .vidare { text-align: center; font-family: var(--fell); }

/* Trons bekännelse */
.sidospalt h2, .tro h2 { font-size: 1.6rem; border-bottom: 1px solid var(--linje); padding-bottom: .5rem; }
.trossats { display: flex; flex-direction: column; gap: .35rem; }
.trossats .påstående { font-size: 1.05rem; line-height: 1.4; }
.mätare { display: flex; align-items: center; gap: .6rem; }
.mätare .spår { flex: 1; height: 4px; background: var(--spår); }
.mätare .fyllning { height: 4px; background: var(--rött); }
.mätare .procent { font-family: var(--fell); font-size: .95rem; color: var(--brun); min-width: 3.2rem; text-align: right; }
.om { margin-top: 1.5rem; padding-top: 1.25rem; border-top: 1px solid var(--linje); display: flex; flex-direction: column; gap: .5rem; font-size: 1rem; }
.om h2 { font-size: 1.3rem; border: 0; padding: 0; }

/* Tron i detalj */
.tro { display: flex; flex-direction: column; gap: 2rem; }
.tro .trossats { gap: .5rem; }
.tro .påstående { font-family: var(--fell); font-size: 1.35rem; line-height: 1.3; }
.skäl { display: grid; grid-template-columns: auto 1fr; gap: .25rem 1rem; font-size: 1rem; }
.skäl dt { font-family: var(--fell); font-style: italic; color: var(--rött); }
.skäl dd { margin: 0; }
.förändring { font-family: var(--fell); font-style: italic; font-size: .95rem; color: var(--blek); }

/* Tidslinjen */
.historia { display: flex; flex-direction: column; gap: 1.25rem; }
.historia h2 { font-size: 2rem; }
.tidslinje { margin: 0; list-style: none; display: flex; flex-direction: column; gap: 1.25rem; border-left: 1px solid var(--linje); padding: 0 0 0 1.5rem; }
.tidslinje li { display: flex; flex-direction: column; gap: .25rem; }
.tidslinje ul { margin: .25rem 0 0; padding-left: 1.1rem; font-size: 1rem; color: var(--brun); }

/* Arkivet */
.arkiv { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 1.25rem; }
.arkiv a { font-family: var(--fell); font-size: 1.4rem; text-decoration: none; }
.bläddra { display: flex; justify-content: space-between; gap: 1rem; font-family: var(--fell); }

/* Sidfot */
.fot { margin-top: 4rem; padding-top: 1.5rem; border-top: 1px solid var(--linje); text-align: center; font-family: var(--fell); font-style: italic; color: var(--brun); display: flex; flex-direction: column; gap: .25rem; }
.fot .liten-text { font-size: .9rem; }

.dold { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

@media (max-width: 560px) {
  body { font-size: 1.1rem; }
  .sida { padding-top: 2rem; }
  .meny { gap: .25rem 1.25rem; }
  .skäl { grid-template-columns: 1fr; }
}

@media print {
  html { background: #fff; }
  .meny, .bläddra { display: none; }
}

/* Altarbilden */
.altarbild { margin: 0; display: flex; flex-direction: column; gap: .5rem; }
.altarbild img { width: 100%; height: auto; display: block; border: 1px solid var(--ram); outline: 1px solid var(--ram); outline-offset: 6px; margin: 6px; width: calc(100% - 12px); filter: sepia(.25) saturate(.9); }
.altarbild figcaption { text-align: center; font-family: var(--fell); font-style: italic; color: var(--blek); font-size: 1rem; }

/* Predikan */
.ljud { width: 100%; margin: .25rem 0; }
.predikan details summary { cursor: pointer; font-family: var(--fell); color: var(--rött); }
.predikan details .text { margin-top: .75rem; }

/* Drömmar */
.dröm { font-style: italic; }
.dröm-titel { font-family: var(--fell); font-size: 1.15rem; }
.dröm-ruta .datum { font-size: .95rem; }
.dröm-blad { padding-left: 1.25rem; border-left: 2px dotted var(--linje); }

/* Högtider */
.högtider { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 2rem; }
.högtid { display: flex; flex-direction: column; gap: .35rem; }
.högtid h3 { font-size: 1.6rem; }
.högtid.i-dag, .högtid-i-dag { padding: 1.25rem 1.5rem; background: var(--blad); border: 1px solid var(--rött); }
.högtid-i-dag { text-align: center; display: flex; flex-direction: column; gap: .5rem; }
.högtid-i-dag .caput { font-family: var(--fell); letter-spacing: .3em; color: var(--rött); }
.högtid-i-dag h2 { font-size: 2rem; }
