/* pagentorn.de – Stylesheet
   Keine externen Schriften oder Skripte: alles lokal, DSGVO-freundlich. */

:root {
  --paper: #f4efe4;
  --paper-2: #ebe3d1;
  --card: #fbf8f1;
  --ink: #25211c;
  --ink-soft: #5d5648;
  --rule: #d9ceb7;
  --brick: #8a3a29;
  --brick-hover: #6c2a1c;
  --on-brick: #fff8ef;
  --shadow: 0 1px 2px rgba(40, 28, 10, .08), 0 8px 24px -12px rgba(40, 28, 10, .25);

  --serif: "Charter", "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;

  --measure: 38rem;
  --wide: 70rem;
  --gutter: clamp(1rem, 4vw, 2rem);
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper: #16140f;
    --paper-2: #1e1b15;
    --card: #1c1913;
    --ink: #ece4d4;
    --ink-soft: #a79f8e;
    --rule: #38332a;
    --brick: #e0937c;
    --brick-hover: #f0b39f;
    --on-brick: #1c1208;
    --shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 8px 24px -12px rgba(0, 0, 0, .6);
  }
  img.photo { filter: brightness(.92); }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 1.5rem; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--serif);
  font-size: 1.0625rem;
  line-height: 1.65;
  hyphens: auto;
  -webkit-hyphens: auto;
  text-rendering: optimizeLegibility;
}
img, video { max-width: 100%; height: auto; display: block; }
a { color: var(--brick); text-decoration-thickness: .06em; text-underline-offset: .18em; }
a:hover { color: var(--brick-hover); }
:focus-visible { outline: 3px solid var(--brick); outline-offset: 3px; border-radius: 2px; }
.skip { position: absolute; left: -999px; top: 0; background: var(--brick); color: var(--on-brick); padding: .6rem 1rem; z-index: 50; }
.skip:focus { left: 0; }

/* ---------- Header / Navigation ---------- */
.site-header { border-bottom: 1px solid var(--rule); background: var(--paper); }
.site-header .bar {
  max-width: var(--wide); margin: 0 auto; padding: .9rem var(--gutter);
  display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: .4rem 2rem;
}
.brand {
  font-size: 1.35rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase;
  color: var(--ink); text-decoration: none;
}
.brand span { color: var(--brick); }
.site-nav ul { display: flex; flex-wrap: wrap; gap: .1rem 1.4rem; list-style: none; margin: 0; padding: 0; }
.site-nav a {
  font-family: var(--sans); font-size: .875rem; letter-spacing: .02em;
  color: var(--ink-soft); text-decoration: none; padding: .35rem 0; display: inline-block;
  border-bottom: 2px solid transparent;
}
.site-nav a:hover { color: var(--ink); }
.site-nav a[aria-current="page"] { color: var(--ink); border-bottom-color: var(--brick); }

/* ---------- Layout ---------- */
main { display: block; }
.wrap { max-width: var(--wide); margin: 0 auto; padding: 0 var(--gutter); }
.section { padding: clamp(2.5rem, 6vw, 4.5rem) 0; }
.section + .section { border-top: 1px solid var(--rule); }
.eyebrow {
  font-family: var(--sans); font-size: .75rem; letter-spacing: .16em; text-transform: uppercase;
  color: var(--brick); margin: 0 0 .75rem; font-weight: 600;
}
h1, h2, h3, h4 { font-family: var(--serif); line-height: 1.2; font-weight: 700; hyphens: manual; text-wrap: balance; }
h1 { font-size: clamp(2.2rem, 6vw, 3.6rem); letter-spacing: -.01em; margin: 0 0 .5rem; }
h2 { font-size: clamp(1.5rem, 3.4vw, 2rem); margin: 0 0 1rem; }
h3 { font-size: 1.2rem; margin: 2.2rem 0 .6rem; }
.lede { font-size: clamp(1.15rem, 2.4vw, 1.4rem); line-height: 1.45; color: var(--ink-soft); margin: 0 0 1.5rem; font-style: italic; }

/* ---------- Hero (Startseite) ---------- */
.hero { padding: clamp(2rem, 6vw, 4.5rem) 0 clamp(2.5rem, 6vw, 4rem); }
.hero .wrap { display: grid; gap: 2.5rem; align-items: center; }
@media (min-width: 60rem) { .hero .wrap { grid-template-columns: 1.05fr .95fr; gap: 4rem; } }
.hero h1 { font-size: clamp(2.8rem, 9vw, 5.6rem); letter-spacing: .02em; text-transform: uppercase; line-height: 1; margin-bottom: 1rem; }
.hero p { max-width: 34rem; }
.hero .actions { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 1.75rem; }
.btn {
  font-family: var(--sans); font-size: .9rem; font-weight: 600; text-decoration: none; letter-spacing: .01em;
  padding: .7rem 1.2rem; border-radius: 2px; border: 1.5px solid var(--brick); color: var(--brick); display: inline-block;
}
.btn:hover { background: var(--brick); color: var(--on-brick); }
.btn.primary { background: var(--brick); color: var(--on-brick); }
.btn.primary:hover { background: var(--brick-hover); border-color: var(--brick-hover); }
.hero figure { margin: 0; }
.hero figure img { width: 100%; box-shadow: var(--shadow); border: 8px solid var(--card); }
figcaption, .caption { font-family: var(--sans); font-size: .8125rem; color: var(--ink-soft); line-height: 1.45; margin-top: .6rem; hyphens: manual; }

/* ---------- Karten ---------- */
.cards { display: grid; gap: 1.25rem; grid-template-columns: repeat(auto-fit, minmax(15.5rem, 1fr)); list-style: none; padding: 0; margin: 2rem 0 0; }
.card {
  display: flex; flex-direction: column; background: var(--card); border: 1px solid var(--rule);
  text-decoration: none; color: inherit; height: 100%; transition: transform .2s ease, box-shadow .2s ease;
}
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow); color: inherit; }
.card .thumb { aspect-ratio: 16 / 10; overflow: hidden; background: var(--paper-2); }
.card .thumb img { width: 100%; height: 100%; object-fit: cover; }
.card .thumb.top img { object-position: center 20%; }
.card .body { padding: 1.1rem 1.25rem 1.35rem; display: flex; flex-direction: column; gap: .35rem; flex: 1; }
.card .kicker { font-family: var(--sans); font-size: .72rem; letter-spacing: .14em; text-transform: uppercase; color: var(--brick); font-weight: 600; }
.card h3 { margin: 0; font-size: 1.25rem; }
.card p { margin: 0; font-size: .95rem; color: var(--ink-soft); line-height: 1.5; hyphens: manual; }
.card .go { margin-top: auto; padding-top: .6rem; font-family: var(--sans); font-size: .85rem; font-weight: 600; color: var(--brick); }
.card:hover .go { text-decoration: underline; }
.cards.two { grid-template-columns: repeat(auto-fit, minmax(19rem, 1fr)); }

/* ---------- Karten / Plan-Abbildungen ---------- */
.maps { display: grid; gap: 2rem; grid-template-columns: repeat(auto-fit, minmax(18rem, 1fr)); margin-top: 1.5rem; }
.maps figure { margin: 0; }
.maps img { width: 100%; border: 1px solid var(--rule); background: var(--card); }
.maps a { display: block; }

/* ---------- Seitenkopf (Unterseiten) ---------- */
.page-head { padding: clamp(2rem, 5vw, 3.5rem) 0 1.5rem; border-bottom: 1px solid var(--rule); }
.page-head .wrap { max-width: calc(var(--measure) + 2 * var(--gutter)); }
.page-head h1 { font-size: clamp(2rem, 5.5vw, 3.2rem); }
.page-head .lede { margin-bottom: .75rem; }
.byline { font-family: var(--sans); font-size: .85rem; color: var(--ink-soft); margin: 0; }

/* ---------- Lesetext ---------- */
.with-toc { max-width: var(--wide); margin: 0 auto; padding: 2.5rem var(--gutter) 3rem; display: grid; gap: 2rem; }
@media (min-width: 72rem) {
  .with-toc { grid-template-columns: 15rem minmax(0, var(--measure)); justify-content: center; gap: 4rem; }
  .with-toc .toc { position: sticky; top: 1.5rem; align-self: start; max-height: calc(100vh - 3rem); overflow: auto; }
}
.prose { max-width: var(--measure); margin: 0 auto; padding: 2.5rem var(--gutter) 3rem; font-size: 1.1875rem; line-height: 1.72; }
.with-toc .prose { padding: 0; margin: 0; max-width: none; font-size: 1.1875rem; line-height: 1.72; }
.prose p { margin: 0 0 1.1em; text-wrap: pretty; }
.prose h2 { margin-top: 3rem; padding-top: 1.5rem; border-top: 1px solid var(--rule); }
.prose h3 { margin-top: 2.2rem; }
.prose h2:first-child, .prose h3:first-child { margin-top: 0; }
.prose figure { margin: 2rem 0; }
.prose figure img { width: 100%; border: 1px solid var(--rule); background: var(--card); }
.prose figure a { display: block; }
.prose blockquote { margin: 1.5rem 0; padding: .1rem 0 .1rem 1.2rem; border-left: 3px solid var(--brick); color: var(--ink-soft); }
.prose hr { border: 0; border-top: 1px solid var(--rule); margin: 2.5rem 0; }
.prose .doc { background: var(--card); border: 1px solid var(--rule); padding: 1.25rem 1.5rem; margin: 1.5rem 0; font-size: 1.05rem; line-height: 1.65; }
.prose .doc p:last-child { margin-bottom: 0; }
.prose .doc-date { text-align: center; font-family: var(--sans); letter-spacing: .08em; font-weight: 600; margin: 1.5rem 0 .75rem; }
.prose .signatures { font-size: .95rem; color: var(--ink-soft); }
.prose .small { font-size: .9rem; color: var(--ink-soft); }
.prose .center { text-align: center; }
.prose .byline-block { text-align: center; color: var(--ink-soft); margin-bottom: 2rem; }
sup.fnref { font-family: var(--sans); font-size: .68em; line-height: 0; margin-left: .08em; }
sup.fnref a { text-decoration: none; font-weight: 700; padding: 0 .1em; }
sup.fnref a:hover { text-decoration: underline; }

.notes { font-size: .95rem; line-height: 1.55; color: var(--ink-soft); padding-left: 1.6rem; hyphens: manual; }
.notes li { margin-bottom: .4rem; padding-left: .3rem; }
.notes li:target { background: color-mix(in srgb, var(--brick) 14%, transparent); }
.notes .back { text-decoration: none; margin-left: .4rem; font-family: var(--sans); }
.prose h2.notes-title { font-size: 1.25rem; }

.toc { font-family: var(--sans); font-size: .85rem; line-height: 1.4; }
.toc summary { cursor: pointer; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; font-size: .72rem; color: var(--brick); padding: .4rem 0; }
.toc ol { list-style: none; margin: .4rem 0 0; padding: 0; }
.toc ol ol { padding-left: .9rem; margin: .15rem 0 .5rem; border-left: 1px solid var(--rule); padding-left: .8rem; }
.toc li { margin: .3rem 0; }
.toc a { color: var(--ink-soft); text-decoration: none; }
.toc a:hover { color: var(--brick); text-decoration: underline; }
.toc > ol > li > a { color: var(--ink); font-weight: 600; }
@media (min-width: 72rem) { .toc summary { pointer-events: none; list-style: none; } .toc summary::-webkit-details-marker { display: none; } }

/* ---------- Hanna-Lampe-Seite ---------- */
.portrait-row { display: grid; gap: 1.5rem; align-items: end; margin: 0 0 2rem; }
@media (min-width: 40rem) { .portrait-row { grid-template-columns: 17rem 1fr; } }
.portrait-row img { width: 100%; max-width: 17rem; border: 8px solid var(--card); box-shadow: var(--shadow); }
.video-wrap { margin: 2rem 0; }
.video-wrap video { width: 100%; background: #000; aspect-ratio: 5 / 4; }
.float-right { float: right; margin: .3rem 0 1rem 1.5rem; width: 10.5rem; }
.float-right img { border: 1px solid var(--rule); }
.book { display: grid; grid-template-columns: 6.5rem 1fr; gap: 1.25rem; align-items: center; background: var(--card); border: 1px solid var(--rule); padding: 1rem; margin: 1.5rem 0; }
.book img { width: 100%; box-shadow: var(--shadow); }
.book p { margin: 0; }
.book .t { font-weight: 700; }

/* ---------- Foto-Galerien ---------- */
.gallery { display: flex; flex-wrap: wrap; gap: .75rem; list-style: none; margin: 0; padding: 0; }
.gallery::after { content: ""; flex-grow: 1000000; }
.gallery li { flex: calc(var(--ar) * 100) 1 calc(var(--ar) * 15rem); min-width: 0; margin: 0; }
.gallery a { display: block; text-decoration: none; color: inherit; background: var(--card); }
.gallery img { width: 100%; aspect-ratio: var(--ar); object-fit: cover; transition: opacity .2s; }
.gallery a:hover img { opacity: .88; }
.gallery .cap { display: block; font-family: var(--sans); font-size: .8rem; color: var(--ink-soft); padding: .35rem .1rem 0; }
.gallery-page { max-width: var(--wide); margin: 0 auto; padding: 2.5rem var(--gutter) 3rem; }
.hint { font-family: var(--sans); font-size: .85rem; color: var(--ink-soft); margin: 0 0 1.5rem; }

/* ---------- Lightbox ---------- */
dialog.lightbox {
  border: 0; padding: 0; background: transparent; color: #f3ecdd; max-width: 100vw; max-height: 100vh; width: 100vw; height: 100vh;
}
dialog.lightbox::backdrop { background: rgba(10, 8, 5, .93); }
.lb-inner { height: 100%; display: grid; grid-template-rows: 1fr auto; place-items: center; padding: 1rem 3.5rem .75rem; }
.lb-inner img { max-width: 100%; max-height: calc(100vh - 6rem); object-fit: contain; box-shadow: 0 10px 50px rgba(0, 0, 0, .6); }
.lb-cap { font-family: var(--sans); font-size: .9rem; text-align: center; padding-top: .75rem; min-height: 2.2rem; }
.lb-btn {
  position: fixed; background: rgba(255, 255, 255, .08); border: 1px solid rgba(255, 255, 255, .25); color: #fff;
  width: 2.75rem; height: 2.75rem; border-radius: 50%; font-size: 1.4rem; line-height: 1; cursor: pointer; display: grid; place-items: center;
}
.lb-btn:hover { background: rgba(255, 255, 255, .2); }
.lb-close { top: .9rem; right: .9rem; }
.lb-prev { left: .6rem; top: 50%; transform: translateY(-50%); }
.lb-next { right: .6rem; top: 50%; transform: translateY(-50%); }
@media (max-width: 40rem) { .lb-inner { padding: 3.5rem .5rem .5rem; } .lb-prev, .lb-next { top: auto; bottom: 3.5rem; transform: none; } }

/* ---------- Reisefotos ---------- */
.trips { list-style: none; margin: 2rem 0 0; padding: 0; border-top: 1px solid var(--rule); }
.trips a {
  display: grid; grid-template-columns: 5.5rem 1fr auto; align-items: baseline; gap: 1rem;
  padding: 1.05rem .25rem; border-bottom: 1px solid var(--rule); text-decoration: none; color: var(--ink);
}
.trips a:hover { background: var(--card); color: var(--ink); }
.trips .year { font-family: var(--sans); font-weight: 600; color: var(--brick); font-variant-numeric: tabular-nums; letter-spacing: .04em; }
.trips .place { font-size: 1.25rem; }
.trips .arrow { font-family: var(--sans); color: var(--ink-soft); }
.trips a:hover .arrow { color: var(--brick); }

/* ---------- Kontakt ---------- */
.contact { display: grid; gap: 2.5rem; align-items: start; }
@media (min-width: 52rem) { .contact { grid-template-columns: 1fr 1.2fr; } }
.contact address { font-style: normal; line-height: 1.7; }
.contact .me { display: flex; gap: 1.25rem; align-items: flex-start; margin-bottom: 1.5rem; }
.contact .me img { width: 7rem; border: 6px solid var(--card); box-shadow: var(--shadow); flex: none; }
.contact figure { margin: 0; }
.contact figure img { width: 100%; border: 8px solid var(--card); box-shadow: var(--shadow); }
.facts { display: grid; grid-template-columns: auto 1fr; gap: .2rem 1rem; margin: 1rem 0; font-family: var(--sans); font-size: .95rem; }
.facts dt { color: var(--ink-soft); }
.facts dd { margin: 0; }

/* ---------- Blättern ---------- */
.pager { max-width: var(--wide); margin: 0 auto; padding: 0 var(--gutter) 3rem; display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.pager a {
  display: block; text-decoration: none; padding: 1rem 1.25rem; border: 1px solid var(--rule); background: var(--card); color: var(--ink);
}
.pager a:hover { border-color: var(--brick); color: var(--ink); }
.pager small { display: block; font-family: var(--sans); font-size: .72rem; letter-spacing: .14em; text-transform: uppercase; color: var(--brick); margin-bottom: .15rem; }
.pager .next { text-align: right; grid-column: 2; }
.pager .prev { grid-column: 1; }

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--rule); background: var(--paper-2); font-family: var(--sans); font-size: .85rem; color: var(--ink-soft); }
.site-footer .wrap { padding-top: 1.5rem; padding-bottom: 1.75rem; display: flex; flex-wrap: wrap; justify-content: space-between; gap: .5rem 2rem; }
.site-footer a { color: var(--ink-soft); }

@media print {
  .site-header, .site-footer, .pager, .toc, .lb-btn { display: none; }
  body { background: #fff; color: #000; font-size: 11pt; }
  .prose, .with-toc .prose { font-size: 11pt; }
  a { color: inherit; text-decoration: none; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; scroll-behavior: auto !important; } }
