/* ==========================================================================
   tuerschloss-wissen.de — "Editorial-Handbuch"
   Warmes Papier, Tinten-Anthrazit, Messing-Akzent. Fraunces + Schibsted Grotesk.
   ========================================================================== */

@import url('/assets/fonts/fonts.css');

:root {
  --paper:        #FAF7F1;
  --paper-deep:   #F1EBDF;
  --paper-card:   #FFFFFF;
  --ink:          #22272F;
  --ink-soft:     #4C525C;
  --ink-faint:    #7A7F88;
  --line:         #E2DACA;
  --line-strong:  #C9BEA8;
  --brass:        #A07826;
  --brass-deep:   #7E5D1B;
  --brass-tint:   #F3EAD2;
  --petrol:       #2E4A54;
  --ok:           #3D6B4F;
  --serif: 'Fraunces', Georgia, serif;
  --sans: 'Schibsted Grotesk', 'Segoe UI', sans-serif;
  --maxw: 1180px;
  --maxw-text: 760px;
  --radius: 6px;
  --shadow-card: 0 1px 2px rgba(34,39,47,.05), 0 8px 24px -12px rgba(34,39,47,.18);
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; overflow-x: hidden; }
body {
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.65;
  color: var(--ink);
  background: var(--paper);
  overflow-x: clip; /* clip statt hidden: kein eigener Scroll-Container (Scrollspy!) */
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--brass-deep); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--brass); }

h1, h2, h3 { font-family: var(--serif); font-weight: 600; line-height: 1.15; letter-spacing: -.01em; }
h1 { font-size: clamp(2rem, 4.4vw, 3.1rem); }
h2 { font-size: clamp(1.45rem, 2.6vw, 1.9rem); }
h3 { font-size: 1.18rem; }

.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 24px; width: 100%; }
.wrap-text { max-width: var(--maxw-text); margin: 0 auto; padding: 0 24px; width: 100%; }

/* --- Overline / Microtype --------------------------------------------- */
.overline {
  font-size: .74rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase;
  color: var(--brass-deep); display: inline-flex; align-items: center; gap: .6em;
}
.overline::before { content: ""; width: 26px; height: 1px; background: var(--brass); }
.overline--plain::before { display: none; }

/* --- Topbar ------------------------------------------------------------ */
.topbar {
  background: var(--ink); color: #CDC4AE;
  font-size: .78rem; letter-spacing: .06em;
}
.topbar .wrap { display: flex; justify-content: space-between; gap: 16px; padding-top: 7px; padding-bottom: 7px; }
.topbar span b { color: #F0E9D8; font-weight: 500; }
.topbar .right { color: #9AA0A9; }
@media (max-width: 640px) { .topbar .right { display: none; } }

/* --- Header ------------------------------------------------------------ */
.site-header {
  background: var(--paper);
  border-bottom: 1px solid var(--line);
  position: sticky; top: 0; z-index: 50;
}
.site-header .wrap { display: flex; align-items: center; gap: 32px; height: 72px; }
.logo { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--ink); flex-shrink: 0; }
.logo svg { display: block; }
.logo .wordmark { font-family: var(--serif); font-weight: 700; font-size: 1.28rem; letter-spacing: -.01em; line-height: 1; }
.logo .wordmark small { display: block; font-family: var(--sans); font-weight: 500; font-size: .64rem; letter-spacing: .22em; text-transform: uppercase; color: var(--brass-deep); margin-top: 4px; }

.main-nav { margin-left: auto; }
.main-nav ul { list-style: none; display: flex; gap: 4px; }
.main-nav a {
  display: block; padding: 8px 12px; font-size: .92rem; font-weight: 500;
  color: var(--ink-soft); text-decoration: none; border-radius: 4px;
}
.main-nav a:hover { color: var(--ink); background: var(--paper-deep); }
.main-nav a.active { color: var(--brass-deep); }
.nav-toggle {
  display: none; margin-left: auto; background: none; border: 1px solid var(--line-strong);
  border-radius: 4px; padding: 9px 11px; cursor: pointer; color: var(--ink);
}
@media (max-width: 1020px) {
  .main-nav {
    display: none; position: absolute; top: 100%; left: 0; right: 0;
    background: var(--paper); border-bottom: 1px solid var(--line);
    box-shadow: 0 24px 40px -24px rgba(34,39,47,.35); padding: 10px 16px 18px;
  }
  .main-nav.open { display: block; }
  .main-nav ul { flex-direction: column; gap: 0; }
  .main-nav a { padding: 12px 10px; font-size: 1.02rem; border-bottom: 1px solid var(--line); }
  .nav-toggle { display: block; }
}

/* --- Hero (Startseite) -------------------------------------------------- */
.hero {
  position: relative; overflow: hidden;
  background: var(--ink); color: #EFE9DB;
}
.hero .wrap { position: relative; z-index: 2; padding-top: 84px; padding-bottom: 92px; max-width: 900px; }
.hero .overline { color: #C7A45A; }
.hero .overline::before { background: #C7A45A; }
.hero h1 { color: #F7F2E6; margin: 18px 0 20px; }
.hero h1 em { font-style: italic; color: #D9B96C; }
.hero p.lead { font-size: 1.14rem; color: #B9BDC4; max-width: 620px; }
.hero-deco {
  position: absolute; right: -60px; top: 50%; transform: translateY(-50%);
  opacity: .16; pointer-events: none; z-index: 1;
}
@media (max-width: 760px) { .hero .wrap { padding-top: 56px; padding-bottom: 60px; } .hero-deco { right: -160px; opacity: .1; } }

.hero-search-hint { margin-top: 34px; display: flex; flex-wrap: wrap; gap: 10px; }
.hero-search-hint a {
  font-size: .85rem; font-weight: 500; color: #E4DCC7; text-decoration: none;
  border: 1px solid rgba(199,164,90,.45); border-radius: 100px; padding: 7px 16px;
}
.hero-search-hint a:hover { background: rgba(199,164,90,.15); border-color: #C7A45A; }

/* --- Kategorie-Kacheln --------------------------------------------------- */
.section { padding: 72px 0; }
.section--alt { background: var(--paper-deep); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.section-head { max-width: 640px; margin-bottom: 40px; }
.section-head h2 { margin: 14px 0 12px; }
.section-head p { color: var(--ink-soft); }

.cat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
@media (max-width: 1020px) { .cat-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px)  { .cat-grid { grid-template-columns: 1fr; } }
.cat-card {
  background: var(--paper-card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 26px 22px 22px; text-decoration: none; color: var(--ink);
  display: flex; flex-direction: column; gap: 10px; position: relative;
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
.cat-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-card); border-color: var(--line-strong); color: var(--ink); }
.cat-card .icon {
  width: 44px; height: 44px; border-radius: 8px; background: var(--brass-tint);
  display: flex; align-items: center; justify-content: center; color: var(--brass-deep);
}
.cat-card h3 { font-size: 1.06rem; }
.cat-card p { font-size: .88rem; color: var(--ink-soft); line-height: 1.5; flex-grow: 1; }
.cat-card .count { font-size: .76rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--brass-deep); }

/* --- Artikel-Karten ------------------------------------------------------ */
.article-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
@media (max-width: 900px) { .article-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 580px) { .article-grid { grid-template-columns: 1fr; } }
.a-card {
  background: var(--paper-card); border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; text-decoration: none; color: var(--ink); display: flex; flex-direction: column;
  transition: transform .18s ease, box-shadow .18s ease;
}
.a-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-card); color: var(--ink); }
.a-card img { aspect-ratio: 16/9; object-fit: cover; width: 100%; border-bottom: 1px solid var(--line); }
.a-card .body { padding: 18px 20px 20px; display: flex; flex-direction: column; gap: 8px; flex-grow: 1; }
.a-card .kicker { font-size: .72rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--brass-deep); }
.a-card h3 { font-size: 1.05rem; line-height: 1.3; }
.a-card p { font-size: .88rem; color: var(--ink-soft); flex-grow: 1; }
.a-card .meta { font-size: .78rem; color: var(--ink-faint); }

/* --- Listen-Reihen (Hub) -------------------------------------------------- */
.hub-group { border-top: 1px solid var(--line); padding-top: 28px; margin-top: 40px; }
.hub-group:first-of-type { margin-top: 0; }
.hub-group h2 { display: flex; align-items: baseline; gap: 14px; margin-bottom: 18px; }
.hub-group h2 .num { font-family: var(--serif); font-style: italic; font-weight: 600; font-size: 1rem; color: var(--brass); }
.hub-list { list-style: none; columns: 2; column-gap: 48px; }
@media (max-width: 760px) { .hub-list { columns: 1; } }
.hub-list li { break-inside: avoid; border-bottom: 1px solid var(--line); }
.hub-list a {
  display: flex; justify-content: space-between; gap: 14px; align-items: baseline;
  padding: 11px 2px; text-decoration: none; color: var(--ink); font-size: .95rem; font-weight: 500;
}
.hub-list a:hover { color: var(--brass-deep); }
.hub-list a::after { content: "→"; color: var(--brass); font-weight: 400; }

/* --- Breadcrumb ----------------------------------------------------------- */
.breadcrumb { font-size: .8rem; color: var(--ink-faint); padding: 18px 0 0; }
.breadcrumb ol { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; }
.breadcrumb li + li::before { content: "/"; margin-right: 6px; color: var(--line-strong); }
.breadcrumb a { color: var(--ink-faint); text-decoration: none; }
.breadcrumb a:hover { color: var(--brass-deep); }

/* --- Artikel-Seite --------------------------------------------------------- */
.art-header { padding: 30px 0 34px; }
.art-header h1 { margin: 16px 0 18px; max-width: 860px; }
.art-meta { display: flex; flex-wrap: wrap; gap: 18px; font-size: .82rem; color: var(--ink-faint); }
.art-meta b { color: var(--ink-soft); font-weight: 500; }
.art-hero { border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); }
.art-hero img { width: 100%; aspect-ratio: 21/9; object-fit: cover; }
@media (max-width: 640px) { .art-hero img { aspect-ratio: 16/10; } }

.art-layout { display: grid; grid-template-columns: minmax(0,1fr) 300px; gap: 56px; padding: 48px 0 72px; }
@media (max-width: 980px) { .art-layout { grid-template-columns: minmax(0, 1fr); gap: 40px; } }

.prose { font-size: 1.02rem; }
.prose > * + * { margin-top: 1.15em; }
.prose h2 {
  margin-top: 2em; padding-top: .9em; border-top: 1px solid var(--line);
  display: flex; gap: 14px; align-items: baseline;
}
.prose h2 .idx { font-family: var(--serif); font-style: italic; font-size: .95rem; color: var(--brass); font-weight: 600; }
.prose h3 { margin-top: 1.6em; }
.prose ul, .prose ol { padding-left: 1.3em; }
.prose li + li { margin-top: .4em; }
.prose figure { margin: 1.8em 0; }
.prose figure img { border-radius: var(--radius); border: 1px solid var(--line); width: 100%; }
.prose figcaption { font-size: .8rem; color: var(--ink-faint); margin-top: 8px; }
.prose table { width: 100%; border-collapse: collapse; font-size: .92rem; display: block; overflow-x: auto; }
@media (min-width: 641px) { .prose table { display: table; overflow-x: visible; } }
.prose th, .prose td { text-align: left; padding: 9px 12px; border-bottom: 1px solid var(--line); }
.prose th { font-weight: 700; font-size: .8rem; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-soft); background: var(--paper-deep); }
.prose blockquote { border-left: 3px solid var(--brass); padding: .3em 0 .3em 1.2em; font-family: var(--serif); font-style: italic; font-size: 1.1rem; color: var(--ink-soft); }

/* Merkkasten */
.notice {
  background: var(--brass-tint); border: 1px solid #E4D5AE; border-radius: var(--radius);
  padding: 18px 20px 18px 54px; position: relative; font-size: .95rem;
}
.notice::before {
  content: ""; position: absolute; left: 20px; top: 21px; width: 18px; height: 18px;
  background: var(--brass-deep);
  -webkit-mask: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="black" stroke-width="2"><circle cx="12" cy="12" r="10"/><path d="M12 8v5M12 16.5v.5"/></svg>') center/contain no-repeat;
          mask: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="black" stroke-width="2"><circle cx="12" cy="12" r="10"/><path d="M12 8v5M12 16.5v.5"/></svg>') center/contain no-repeat;
}
.notice b:first-child { display: block; margin-bottom: 4px; font-family: var(--serif); font-size: 1.02rem; }

/* --- Sidebar ---------------------------------------------------------------- */
.sidebar { display: flex; flex-direction: column; gap: 26px; }
.side-box { border: 1px solid var(--line); border-radius: var(--radius); background: var(--paper-card); padding: 22px; }
.side-box h4 { font-family: var(--serif); font-size: 1.02rem; margin-bottom: 14px; padding-bottom: 12px; border-bottom: 1px solid var(--line); }
.side-box ul { list-style: none; }
.side-box li + li { margin-top: 2px; }
.side-box li a { display: block; padding: 7px 0; font-size: .9rem; color: var(--ink-soft); text-decoration: none; }
.side-box li a:hover { color: var(--brass-deep); }
.side-box--toc { position: sticky; top: 96px; }
.toc-list { list-style: none; counter-reset: none; }
.toc-list li + li { border-top: 1px solid var(--line); }
.toc-list a {
  display: flex; align-items: baseline; gap: 12px;
  padding: 10px 2px; font-size: .88rem; line-height: 1.4;
  color: var(--ink-soft); text-decoration: none;
  transition: color .15s ease;
}
.toc-list .toc-num {
  font-family: var(--serif); font-style: italic; font-weight: 600;
  font-size: .82rem; color: var(--brass); flex-shrink: 0;
  transition: transform .15s ease;
}
.toc-list a:hover { color: var(--ink); }
.toc-list a:hover .toc-num { transform: translateX(2px); }
.toc-list a.toc-active { color: var(--brass-deep); font-weight: 700; }
.toc-list a.toc-active .toc-num { color: var(--brass-deep); }
.term-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.term-chips a {
  font-size: .8rem; font-weight: 500; color: var(--petrol); text-decoration: none;
  background: var(--paper-deep); border: 1px solid var(--line); border-radius: 100px; padding: 5px 13px;
}
.term-chips a:hover { border-color: var(--brass); color: var(--brass-deep); }

/* --- FAQ ---------------------------------------------------------------------- */
.faq { margin-top: 2.4em; }
.faq details { border: 1px solid var(--line); border-radius: var(--radius); background: var(--paper-card); margin-top: 10px; }
.faq summary {
  cursor: pointer; list-style: none; padding: 15px 46px 15px 18px; font-weight: 500; position: relative; font-size: .98rem;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+"; position: absolute; right: 18px; top: 50%; transform: translateY(-52%);
  font-family: var(--serif); font-size: 1.3rem; color: var(--brass);
}
.faq details[open] summary::after { content: "–"; }
.faq .answer { padding: 0 18px 16px; color: var(--ink-soft); font-size: .95rem; }

/* --- Lexikon -------------------------------------------------------------------- */
.alpha-nav { display: flex; flex-wrap: wrap; gap: 6px; margin: 26px 0 8px; }
.alpha-nav a, .alpha-nav span {
  width: 36px; height: 36px; display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: .85rem; border: 1px solid var(--line); border-radius: 4px;
  text-decoration: none; color: var(--ink); background: var(--paper-card);
}
.alpha-nav a:hover { border-color: var(--brass); color: var(--brass-deep); }
.alpha-nav span { color: var(--line-strong); background: transparent; }
.lex-letter { border-top: 1px solid var(--line); margin-top: 40px; padding-top: 10px; display: grid; grid-template-columns: 90px 1fr; gap: 20px; }
@media (max-width: 640px) { .lex-letter { grid-template-columns: 1fr; gap: 4px; } }
.lex-letter .letter { font-family: var(--serif); font-size: 3.4rem; font-weight: 700; color: var(--brass); line-height: 1; font-style: italic; }
.lex-terms { list-style: none; columns: 2; column-gap: 40px; padding-top: 10px; }
@media (max-width: 900px) { .lex-terms { columns: 1; } }
.lex-terms li { break-inside: avoid; }
.lex-terms a { display: block; padding: 8px 0; border-bottom: 1px solid var(--line); text-decoration: none; color: var(--ink); font-size: .95rem; font-weight: 500; }
.lex-terms a small { display: block; font-weight: 400; color: var(--ink-faint); font-size: .8rem; }
.lex-terms a:hover { color: var(--brass-deep); }

.lex-def-box { border-left: 3px solid var(--brass); background: var(--paper-card); border-radius: 0 var(--radius) var(--radius) 0; border-top: 1px solid var(--line); border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 22px 26px; margin: 26px 0; font-size: 1.05rem; }

/* --- Hersteller -------------------------------------------------------------------- */
.brand-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
@media (max-width: 900px) { .brand-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .brand-grid { grid-template-columns: 1fr; } }
.brand-card {
  border: 1px solid var(--line); border-radius: var(--radius); background: var(--paper-card);
  padding: 24px; text-decoration: none; color: var(--ink); display: flex; flex-direction: column; gap: 8px;
  transition: transform .18s ease, box-shadow .18s ease;
}
.brand-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-card); color: var(--ink); }
.brand-card .mono { font-family: var(--serif); font-size: 1.35rem; font-weight: 700; }
.brand-card p { font-size: .88rem; color: var(--ink-soft); }

/* --- CTA / Querverweis-Box ------------------------------------------------------------ */
.crossref {
  margin: 2.2em 0; border: 1px solid var(--line-strong); border-radius: var(--radius);
  background: linear-gradient(135deg, var(--brass-tint), #FBF6E9);
  padding: 22px 24px; display: flex; gap: 18px; align-items: flex-start;
}
.crossref .icon { flex-shrink: 0; width: 40px; height: 40px; border-radius: 8px; background: var(--ink); color: #D9B96C; display: flex; align-items: center; justify-content: center; }
.crossref b { font-family: var(--serif); font-size: 1.05rem; display: block; margin-bottom: 3px; }
.crossref p { font-size: .9rem; color: var(--ink-soft); }
.crossref a { font-weight: 700; }

/* --- Footer ------------------------------------------------------------------------------ */
.site-footer { background: var(--ink); color: #A9AEB6; margin-top: 40px; }
.site-footer .top { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 40px; padding: 60px 0 44px; }
@media (max-width: 900px) { .site-footer .top { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .site-footer .top { grid-template-columns: 1fr; } }
.site-footer h5 { color: #F0E9D8; font-family: var(--serif); font-size: 1rem; margin-bottom: 16px; font-weight: 600; }
.site-footer ul { list-style: none; }
.site-footer li + li { margin-top: 8px; }
.site-footer a { color: #A9AEB6; text-decoration: none; font-size: .9rem; }
.site-footer a:hover { color: #D9B96C; }
.site-footer .about { font-size: .9rem; max-width: 320px; }
.site-footer .about .logo { color: #F7F2E6; margin-bottom: 16px; }
.site-footer .about .logo .wordmark small { color: #C7A45A; }
.site-footer .legal {
  border-top: 1px solid rgba(255,255,255,.09); padding: 20px 0; font-size: .78rem; color: #7A7F88;
  display: flex; flex-wrap: wrap; gap: 8px 24px; justify-content: space-between;
}
.site-footer .legal ul { display: flex; gap: 20px; }

/* --- Hilfsklassen --------------------------------------------------------------------------- */
.btn {
  display: inline-flex; align-items: center; gap: 10px; background: var(--ink); color: #F0E9D8;
  font-weight: 700; font-size: .92rem; text-decoration: none; border-radius: 4px; padding: 13px 26px;
  border: none; cursor: pointer; transition: background .15s ease;
}
.btn:hover { background: #343B46; color: #FFF; }
.btn--brass { background: var(--brass-deep); }
.btn--brass:hover { background: var(--brass); }
.center { text-align: center; }
.mt-40 { margin-top: 40px; }

/* Reveal-Animation (dezent, nur beim Laden) */
@media (prefers-reduced-motion: no-preference) {
  .reveal { opacity: 0; transform: translateY(14px); animation: rise .6s ease forwards; }
  .reveal.d1 { animation-delay: .08s; } .reveal.d2 { animation-delay: .16s; } .reveal.d3 { animation-delay: .24s; }
  @keyframes rise { to { opacity: 1; transform: none; } }
}
