/* ---------- Schriften (lokal eingebunden, DSGVO-freundlich) ---------- */
@font-face { font-family: "Newsreader"; src: url("fonts/newsreader-latin-400-normal.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Newsreader"; src: url("fonts/newsreader-latin-400-italic.woff2") format("woff2"); font-weight: 400; font-style: italic; font-display: swap; }
@font-face { font-family: "Newsreader"; src: url("fonts/newsreader-latin-600-normal.woff2") format("woff2"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Figtree"; src: url("fonts/figtree-latin-400-normal.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Figtree"; src: url("fonts/figtree-latin-500-normal.woff2") format("woff2"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Figtree"; src: url("fonts/figtree-latin-600-normal.woff2") format("woff2"); font-weight: 600; font-display: swap; }

/* ---------- Farben ---------- */
:root {
  --paper: #f3eee4;   /* Hintergrund: warmes Beige */
  --ink: #1f1d19;
  --muted: #6e685d;
  --line: #ddd5c6;
  --accent: #3d5a3a;
  --tint: #e9e2d4;
  --band: #e8e0d0;     /* Fußzeile */
  --on-accent: #fff;
  --danger: #a3322a;
  --serif: "Newsreader", Georgia, "Times New Roman", serif;
  --sans: "Figtree", system-ui, -apple-system, "Segoe UI", sans-serif;
  --wrap: 72rem;
  --narrow: 42rem;
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root { --paper: #1d1a16; --ink: #ede6d9; --muted: #a89f90; --line: #36312a; --accent: #b3c9a4; --tint: #27231e; --danger: #e0876f; --band: #25211c; --on-accent: #1d1a16; }  /* warmes Dunkelbraun */
}

/* ---------- Grundlagen ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 400 1rem/1.6 var(--sans); }
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: .2em; }
a:hover { color: var(--accent); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
h1, h2, h3 { font-family: var(--serif); font-weight: 400; line-height: 1.15; margin: 0; }
.wrap { max-width: var(--wrap); margin-inline: auto; padding-inline: clamp(1.25rem, 4vw, 2.5rem); }
.wrap-narrow { max-width: calc(var(--narrow) + 5rem); margin-inline: auto; padding-inline: clamp(1.25rem, 4vw, 2.5rem); }
.skip { position: absolute; left: -999px; }
.skip:focus { left: 1rem; top: 1rem; background: var(--paper); padding: .5rem 1rem; z-index: 10; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.muted, .empty, .hint { color: var(--muted); }

/* ---------- Kopf ---------- */
.site-header { padding-block: 1.75rem; }
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 2rem; }
.brand { text-decoration: none; display: flex; flex-direction: column; }
.brand-name { font: 400 1.75rem/1 var(--serif); letter-spacing: -.01em; }
.brand-name.small { font-size: 1.25rem; text-decoration: none; }
.brand-tag { color: var(--muted); font-size: .875rem; margin-top: .35rem; }
.site-nav { display: flex; gap: 1.75rem; }
.site-nav a { text-decoration: none; font-weight: 500; font-size: .95rem; padding-block: .25rem; border-bottom: 1px solid transparent; }
.site-nav a[aria-current] { border-color: var(--accent); border-bottom-width: 2px; }
.nav-toggle { display: none; }

@media (max-width: 760px) {
  .header-inner { gap: 1rem; row-gap: 0; }
  .brand { flex: 1; min-width: 0; }
  .brand-name { font-size: 1.5rem; }
  .nav-toggle { flex: none; }
  .nav-toggle { display: block; font: 500 .95rem var(--sans); background: none; color: inherit; border: 1px solid var(--line); border-radius: 2rem; padding: .4rem 1rem; }
  .header-inner { flex-wrap: wrap; }
  .site-nav { display: none; width: 100%; flex-direction: column; gap: .25rem; padding-top: .75rem; }
  .site-nav.open { display: flex; }
  .site-nav a { font-size: 1.1rem; padding-block: .5rem; }
}

/* ---------- Startseite ---------- */
.intro { padding-block: clamp(3rem, 9vw, 7rem) clamp(2.5rem, 6vw, 4.5rem); }
.intro.has-hero { display: grid; grid-template-columns: minmax(0, 6fr) minmax(0, 5fr); gap: clamp(2rem, 6vw, 6rem); align-items: center; padding-block: clamp(2rem, 5vw, 4rem) clamp(3rem, 6vw, 5rem); }
.intro.has-hero h1 { font-size: clamp(2.5rem, 5.2vw, 4.5rem); max-width: 16ch; }
.intro-hero { margin: 0; }
.intro-hero img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; border-radius: 14px; }
@media (max-width: 760px) {
  .intro.has-hero { grid-template-columns: 1fr; }
  .intro-hero { order: -1; }
  .intro-hero img { aspect-ratio: 4 / 3; }
}
.intro h1 { font-size: clamp(2.75rem, 7.5vw, 5.5rem); letter-spacing: -.025em; line-height: 1; max-width: 14ch; }
.intro-text { font: 400 clamp(1.2rem, 2.2vw, 1.45rem)/1.5 var(--serif); max-width: 36ch; margin-top: 1.75rem; color: var(--muted); }

.block { padding-block: 2rem 4rem; }
.block-head { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; border-top: 1px solid var(--line); padding-top: 1.25rem; margin-bottom: 2rem; }
.block-head h2 { font-size: 1.6rem; }
.block-head a { font-size: .95rem; font-weight: 500; }
.page-title { font-size: clamp(2.25rem, 5vw, 3.5rem); letter-spacing: -.02em; margin: 1rem 0 2.5rem; }
.lead { font: 1.2rem/1.55 var(--serif); color: var(--muted); max-width: 44ch; margin: -1.5rem 0 2.5rem; }
.crumb { margin: 1rem 0 0; font-size: .95rem; }

/* ---------- Beiträge ---------- */
.post-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(18rem, 1fr)); gap: 3rem 2rem; }
.post-card a { text-decoration: none; display: block; }
.post-card-img { aspect-ratio: 3 / 2; background: var(--tint); overflow: hidden; margin-bottom: 1rem; border-radius: 8px; }
.post-card-img img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s ease; }
.post-card a:hover img { transform: scale(1.03); }
.post-card time, .post-head time { font-size: .875rem; color: var(--accent); font-weight: 500; }
.post-card h3 { font-size: 1.5rem; margin: .35rem 0 .5rem; letter-spacing: -.01em; }
.post-card a:hover h3 { color: var(--accent); }
.post-card p { margin: 0; color: var(--muted); font-size: .95rem; }

.pager { display: flex; justify-content: space-between; align-items: center; margin-top: 4rem; font-size: .95rem; color: var(--muted); }
.pager a { color: var(--ink); font-weight: 500; }

.post-head { padding-block: clamp(2rem, 6vw, 4.5rem) 2.5rem; }
.post-head h1 { font-size: clamp(2.25rem, 5.5vw, 3.75rem); letter-spacing: -.02em; margin-top: .5rem; }
.post-cover { margin: 0 auto 3rem; }
.post-cover img { width: 100%; max-height: 80vh; object-fit: cover; }
.draft-note { display: inline-block; background: var(--tint); padding: .25rem .75rem; font-size: .85rem; margin: 0 0 1rem; }

.prose { font: 400 1.2rem/1.7 var(--serif); }
.prose > * { max-width: var(--narrow); }
.prose h2 { font-size: 1.75rem; margin: 2.5rem 0 .75rem; }
.prose h3 { font-size: 1.35rem; margin: 2rem 0 .5rem; }
.prose p { margin: 0 0 1.25em; }
.prose img { margin: 2rem 0; }
.prose blockquote { margin: 2rem 0; padding: 1rem 1.4rem; border-left: 3px solid var(--accent); border-radius: 0 8px 8px 0;
  background: color-mix(in srgb, var(--accent) 9%, transparent); font-style: italic; color: var(--ink); }
.prose a { color: var(--accent); }
.post-back { padding-block: 3rem 1rem; font-size: .95rem; }

.post-nav { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; margin-top: 3.5rem; }
.post-nav a { text-decoration: none; display: flex; flex-direction: column; gap: .35rem; padding: 1.1rem 1.25rem; border: 1px solid var(--line); border-radius: 6px; transition: border-color .2s, background .2s; }
.post-nav a:hover { border-color: var(--accent); background: var(--tint); }
.post-nav span { font-size: .85rem; color: var(--muted); }
.post-nav strong { font: 400 1.25rem/1.25 var(--serif); }
.post-nav-next { text-align: right; grid-column: 2; }
@media (max-width: 600px) { .post-nav { grid-template-columns: 1fr; } .post-nav-next { grid-column: 1; } }

.comments { border-top: 1px solid var(--line); margin-top: 3rem; padding-top: 2rem; }
.comments h2 { font-size: 1.6rem; margin-bottom: 1rem; }
.consent { background: var(--tint); padding: 1.25rem 1.5rem; font-size: .95rem; }
.consent p { margin: 0 0 1rem; }

/* ---------- Galerie ---------- */
.photo-grid { columns: 4 14rem; column-gap: 1rem; }
@media (max-width: 600px) { .photo-grid { columns: 2; column-gap: .6rem; } .photo-grid .photo { margin-bottom: .6rem; } }

/* Startseite: festes Raster, großes Bild links */
.home-grid { columns: auto !important; display: grid; grid-template-columns: 2fr 1fr 1fr; grid-template-rows: repeat(2, minmax(0, 1fr)); gap: 1rem; aspect-ratio: 2 / 1; }
.home-grid .photo { margin: 0; overflow: hidden; border-radius: 8px; }
.home-grid .photo:first-child { grid-row: span 2; }
.home-grid img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s ease; }
.home-grid .photo:hover img { transform: scale(1.03); opacity: 1; }
.home-grid.few { grid-template-columns: repeat(auto-fill, minmax(12rem, 1fr)); grid-template-rows: none; aspect-ratio: auto; }
.home-grid.few .photo { aspect-ratio: 1; grid-row: auto; }
@media (max-width: 600px) {
  .home-grid { grid-template-columns: 1fr 1fr; grid-template-rows: none; aspect-ratio: auto; gap: .6rem; }
  .home-grid .photo { aspect-ratio: 1; }
  .home-grid .photo:first-child { grid-column: span 2; grid-row: auto; aspect-ratio: 4 / 3; }
}
.photo { display: block; margin-bottom: 1rem; break-inside: avoid; background: var(--tint); }
.photo img { width: 100%; }
.photo:hover img { opacity: .88; }

.album-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(17rem, 1fr)); gap: 3rem 2rem; }
.album-card { text-decoration: none; }
.album-img { aspect-ratio: 4 / 3; overflow: hidden; background: var(--tint); margin-bottom: .9rem; border-radius: 8px; }
.album-img img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s ease; }
.album-card:hover img { transform: scale(1.03); }
.album-card h2 { font-size: 1.5rem; }
.album-card p { margin: .2rem 0 0; color: var(--muted); font-size: .9rem; }

.lightbox { position: fixed; inset: 0; background: rgba(12, 14, 11, .96); z-index: 50; display: grid; grid-template-columns: 4rem 1fr 4rem; align-items: center; color: #eee; }
.lightbox[hidden] { display: none; }
.lightbox figure { margin: 0; display: flex; flex-direction: column; align-items: center; gap: .75rem; }
.lightbox img { max-height: 86vh; max-width: 100%; object-fit: contain; }
.lightbox figcaption { font: 1rem var(--serif); color: #bbb; text-align: center; }
.lightbox button { background: none; border: 0; color: #eee; font-size: 2.5rem; cursor: pointer; height: 100%; }
.lb-close { position: absolute; top: 1rem; right: 1.25rem; height: auto !important; }
@media (max-width: 600px) { .lightbox { grid-template-columns: 2.5rem 1fr 2.5rem; } }

/* ---------- Über mich ---------- */
.about.has-img { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(2rem, 5vw, 5rem); align-items: start; }
.about-img { margin: 1rem 0 0; }
.about-img img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; border-radius: 4px; }
@media (max-width: 760px) { .about.has-img { grid-template-columns: 1fr; } }

/* ---------- Formulare ---------- */
.form { display: flex; flex-direction: column; gap: 1.25rem; max-width: 36rem; }
.form label, .field { display: flex; flex-direction: column; gap: .4rem; font-weight: 500; font-size: .95rem; }
.form .label { font-weight: 500; font-size: .95rem; }
.form input:not([type=checkbox]):not([type=radio]):not([type=file]), .form textarea {
  font: 400 1rem var(--sans); color: var(--ink); background: var(--paper);
  border: 1px solid var(--line); border-radius: 4px; padding: .7rem .8rem; width: 100%;
}
.form input:focus, .form textarea:focus { border-color: var(--accent); outline: none; box-shadow: 0 0 0 3px var(--tint); }
.form label.check { flex-direction: row; align-items: flex-start; gap: .6rem; font-weight: 400; }
.form label.check input { margin-top: .3rem; accent-color: var(--accent); }
.field-err { color: var(--danger); font-weight: 400; font-size: .9rem; }
.hint { font-weight: 400; font-size: .85rem; }
.hp { position: absolute; left: -9999px; }
.btn { align-self: flex-start; font: 500 1rem var(--sans); background: var(--accent); color: var(--on-accent); border: 0; border-radius: 2rem; padding: .75rem 1.5rem; cursor: pointer; text-decoration: none; display: inline-block; }
.btn:hover { background: color-mix(in srgb, var(--accent) 82%, var(--ink)); color: var(--on-accent); }
.notice { padding: .9rem 1.2rem; border-left: 3px solid var(--accent); background: var(--tint); }
.notice.err { border-color: var(--danger); }

/* ---------- Fuß ---------- */
.site-footer { background: var(--band); margin-top: 4rem; padding-block: 2.5rem; font-size: .9rem; color: var(--muted); }
.footer-inner { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 1rem; }
.footer-inner p { margin: 0; }
.footer-inner nav { display: flex; gap: 1.5rem; }

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

/* Listen aus dem Editor (Quill speichert Aufzählungen als <ol> mit data-list) */
.prose li[data-list="bullet"] { list-style-type: disc; }
.prose li[data-list="ordered"] { list-style-type: decimal; }
.prose .ql-ui { display: none; }
.prose li { margin-bottom: .35em; }
.prose .ql-align-center { text-align: center; }

/* ---------- Suche ---------- */
.nav-search { display: inline-flex; align-items: center; gap: .4rem; }
.nav-search svg, .search-big svg { width: 1.1rem; height: 1.1rem; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
.page-head { display: flex; justify-content: space-between; align-items: center; gap: 1.5rem; flex-wrap: wrap; margin-bottom: 2.5rem; }
.page-head .page-title { margin: 1rem 0 0; }
.search-mini input, .search-big input {
  font: 400 1rem var(--sans); color: var(--ink); background: var(--paper);
  border: 1px solid var(--line); border-radius: 2rem; padding: .65rem 1.1rem; width: 100%; }
.search-mini { width: min(100%, 18rem); }
.search-mini input:focus, .search-big input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 4px var(--tint); }
.search-big { display: flex; align-items: center; gap: .75rem; position: relative; margin-bottom: 2rem; }
.search-big svg { position: absolute; left: 1.1rem; color: var(--muted); pointer-events: none; }
.search-big input { padding: .9rem 1.2rem .9rem 2.9rem; font-size: 1.1rem; }
.search-big .btn { flex: none; }
.search-count { color: var(--muted); font-size: .95rem; margin: 0 0 1.5rem; }
.search-results { display: flex; flex-direction: column; }
.search-result { display: grid; grid-template-columns: 8.5rem 1fr; gap: 1.5rem; padding: 1.5rem 0; border-top: 1px solid var(--line); text-decoration: none; align-items: start; }
.search-result:not(:has(img)) { grid-template-columns: 1fr; }
.search-result img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 8px; }
.search-result time { font-size: .85rem; color: var(--accent); font-weight: 500; }
.search-result h2 { font-size: 1.45rem; margin: .2rem 0 .4rem; }
.search-result p { margin: 0; color: var(--muted); font-size: .95rem; }
.search-result:hover h2 { color: var(--accent); }
mark { background: color-mix(in srgb, var(--accent) 22%, transparent); color: inherit; padding: 0 .1em; border-radius: 2px; }
@media (max-width: 600px) { .search-result { grid-template-columns: 5.5rem 1fr; gap: 1rem; } .search-big .btn { display: none; } }

/* ---------- Gefühl: sanfte Übergänge ---------- */
html { scroll-behavior: smooth; }
@view-transition { navigation: auto; }            /* weiches Überblenden zwischen Seiten (moderne Browser) */
::view-transition-old(root), ::view-transition-new(root) { animation-duration: .35s; }

.js .reveal { opacity: 0; transform: translateY(22px);
  transition: opacity .9s ease, transform .9s cubic-bezier(.2, .7, .2, 1); transition-delay: var(--d, 0ms); }
.js .reveal.in { opacity: 1; transform: none; }
.js img.fade { opacity: 0; transition: opacity .7s ease; }
.js img.fade.loaded { opacity: 1; }
.intro-hero img { transition: transform 1.6s cubic-bezier(.2, .7, .2, 1); }
.js .intro-hero.reveal:not(.in) img { transform: scale(1.04); }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js .reveal, .js img.fade { opacity: 1 !important; transform: none !important; transition: none !important; }
  @view-transition { navigation: none; }
}
