/* ===== FONTS ===== */
@import url('https://fonts.googleapis.com/css2?family=Barlow+Condensed:wght@700;900&family=Inter:wght@400;500;600&family=JetBrains+Mono:wght@400&display=swap');

/* ===== VARIABLEN ===== */
:root {
  --rot:       #E30613;
  --blau:      #0060A9;
  --gruen:     #00A651;
  --orange:    #F7941D;
  --violett:   #662D91;
  --dunkelrot: #CC0000;
  --grau:      #555555;
  --schwarz:   #111111;
  --hellgrau:  #F0EEE8;

  --f-titel: 'Barlow Condensed', 'Arial Narrow', Arial, sans-serif;
  --f-text:  'Inter', Helvetica, sans-serif;
  --f-mono:  'JetBrains Mono', monospace;

  --max: 1280px;
  --pad: clamp(1.5rem, 5vw, 4rem);
  --gap: clamp(3rem, 6vw, 5rem);
  --r:   0px;
}

/* ===== RESET ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html  { scroll-behavior: smooth; }
body  { font-family: var(--f-text); font-size: 1rem; line-height: 1.7; color: var(--schwarz); background: #fff; -webkit-font-smoothing: antialiased; }
img   { display: block; max-width: 100%; height: auto; }
a     { color: inherit; text-decoration: none; }

/* ===== LAYOUT ===== */
.wrap     { max-width: var(--max); margin: 0 auto; padding: 0 var(--pad); }
.sec      { padding: var(--gap) 0; }
.sec--alt { background: var(--hellgrau); }

/* ===== HEADER ===== */
#header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  height: 72px;
  background: rgba(255,255,255,.97);
  box-shadow: 0 1px 0 rgba(0,0,0,.14);
  transition: background .25s, box-shadow .25s;
}
#header.scrolled {
  background: rgba(255,255,255,.97);
  box-shadow: 0 1px 0 rgba(0,0,0,.14);
}
.header-inner {
  height: 100%; display: flex; align-items: center; justify-content: space-between; gap: 2rem;
  max-width: none; margin: 0; padding: 0 2rem 0 16rem;
}
.logo      { display: flex; flex-direction: column; line-height: 1.15; }
.logo-roro { font-family: var(--f-titel); font-size: 1.3rem; font-weight: 900; letter-spacing: -.01em; color: var(--rot); }
.logo-sub  { font-size: .78rem; color: var(--grau); }

.nav { display: flex; gap: 0; align-items: center; }
.nav a {
  position: relative; font-size: .88rem; padding: .4rem 1.8rem;
  color: var(--schwarz); transition: color .2s;
}
.nav a > svg { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; overflow: visible; }
.nav a > svg rect { fill: none; stroke: var(--c, var(--rot)); }

/* Hamburger */
.burger { display: none; flex-direction: column; gap: 5px; background: none; border: none; cursor: pointer; padding: .5rem; color: var(--schwarz); }
.burger span { display: block; width: 24px; height: 2px; background: currentColor; transition: all .3s; }

/* Mobile overlay */
#nav-overlay {
  display: none; position: fixed; inset: 0; background: #111; z-index: 200;
  flex-direction: column; align-items: flex-start; justify-content: center; gap: .25rem;
  padding: 0 var(--pad);
}
#nav-overlay.open { display: flex; }
#nav-overlay a {
  font-family: var(--f-titel);
  font-size: clamp(2.4rem, 7vw, 4.5rem);
  font-weight: 900;
  color: #fff;
  line-height: 1.0;
  padding: .1rem 0 .1rem 1rem;
  border-left: 5px solid transparent;
  transition: border-color .15s, color .15s;
}
#nav-overlay a:hover { border-left-color: var(--c, var(--rot)); color: var(--c, var(--rot)); }
.nav-close { position: absolute; top: 1.25rem; right: 1.5rem; background: none; border: none; color: #fff; font-size: 2.5rem; cursor: pointer; line-height: 1; }

/* ===== SEITEN-HEADER (Unterseiten) ===== */
.page-head {
  padding: calc(72px + 2.5rem) 0 2rem;
  border-bottom: 3px solid var(--accent, var(--rot));
}
.page-head h1 {
  font-family: var(--f-titel);
  font-size: clamp(4rem, 10vw, 10rem);
  font-weight: 900;
  line-height: .85;
  letter-spacing: -.02em;
  color: var(--accent, var(--rot));
}
.page-head p    { font-size: 1rem; line-height: 1.72; color: var(--grau); max-width: 65ch; margin-top: .75rem; }
.page-head .meta { font-family: var(--f-mono); font-size: .85rem; color: var(--grau); margin-top: .6rem; }

/* ===== TYPOGRAFIE ===== */
h2.sec-title {
  font-family: var(--f-titel);
  font-size: clamp(2rem, 4.5vw, 3.5rem);
  font-weight: 900;
  letter-spacing: -.02em;
  line-height: .88;
  margin-bottom: 1.5rem;
  color: var(--accent, var(--schwarz));
}
h3.sub-title { font-family: var(--f-text); font-size: 1rem; font-weight: 700; margin-bottom: .65rem; }
.lead {
  font-family: var(--f-titel);
  font-size: clamp(1.8rem, 4vw, 3rem);
  font-weight: 900;
  line-height: .95;
  letter-spacing: -.02em;
}
.text-link { display: inline-flex; align-items: center; gap: .4em; font-weight: 600; color: var(--rot); transition: gap .15s; }
.text-link:hover { gap: .7em; }

/* ===== SCROLL-ANIMATION ===== */
.reveal { opacity: 0; transform: translateY(20px); transition: opacity .6s ease, transform .6s ease; }
.reveal.in { opacity: 1; transform: none; }
.stagger > * { opacity: 0; transform: translateY(16px); transition: opacity .45s ease, transform .45s ease; }
.stagger.in > *:nth-child(1) { transition-delay: .05s; }
.stagger.in > *:nth-child(2) { transition-delay: .10s; }
.stagger.in > *:nth-child(3) { transition-delay: .15s; }
.stagger.in > *:nth-child(4) { transition-delay: .20s; }
.stagger.in > *:nth-child(5) { transition-delay: .25s; }
.stagger.in > *:nth-child(6) { transition-delay: .30s; }
.stagger.in > *:nth-child(7) { transition-delay: .35s; }
.stagger.in > * { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal, .stagger > * { opacity: 1; transform: none; transition: none; }
}

/* ===== STARTSEITE NAV-GRID (Fallback, index.html nutzt eigene Styles) ===== */
.nav-grid { display: flex; flex-direction: column; }
.nav-row  { display: grid; grid-template-columns: repeat(4,1fr); }
.nav-row--center { grid-template-columns: repeat(3,1fr); }
.tile {
  position: relative; aspect-ratio: 4/3;
  display: block; cursor: pointer;
  overflow: hidden; transition: filter .18s;
}
.tile:hover { filter: brightness(.82); }
.tile-bg  { position: absolute; inset: 0; background: var(--c); }
.tile-bg img { width: 100%; height: 100%; object-fit: cover; }
.tile-content {
  position: absolute; inset: 0;
  padding: 1rem 1.2rem;
  display: flex; flex-direction: column; justify-content: flex-start;
}
.tile-title {
  font-family: var(--f-titel);
  font-size: clamp(1.4rem, 2.4vw, 2.4rem);
  font-weight: 900; color: #fff; line-height: .9; letter-spacing: -.01em;
}
.tile-label  { display: none; }
.tile-teaser { display: none; }

/* ===== BÜCHER-GRID ===== */
.book-grid   { display: grid; grid-template-columns: repeat(4,1fr); gap: 1px; background: #d8d4cc; }
.book-grid--3 { grid-template-columns: repeat(3,1fr); }
.book-card {
  background: #fff;
  transition: background .15s;
}
.book-card:hover { background: var(--hellgrau); }
.book-cover { aspect-ratio: 5/7; background: var(--accent, var(--blau)); position: relative; overflow: hidden; }
.book-cover img { width: 100%; height: 100%; object-fit: cover; }
.book-ph {
  width: 100%; height: 100%;
  display: flex; align-items: flex-start; justify-content: flex-start;
  padding: .9rem;
  font-family: var(--f-titel); font-size: clamp(1rem, 2.5vw, 1.6rem); font-weight: 900;
  color: #fff; line-height: .95; letter-spacing: -.01em;
  background: var(--accent, var(--blau));
}
.badge {
  position: absolute; bottom: .85rem; right: .85rem; padding: .2rem .5rem;
  font-size: .62rem; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: #fff;
}
.badge--red   { background: var(--dunkelrot); }
.badge--green { background: var(--gruen); }
.badge--grey  { background: var(--grau); }
.book-info   { padding: .7rem .85rem .95rem; display: flex; flex-direction: column; gap: .22rem; }
.book-titel  { font-family: var(--f-text); font-size: .88rem; font-weight: 700; line-height: 1.3; color: var(--accent, var(--blau)); }
.book-autor  { font-size: .8rem; color: var(--schwarz); }
.book-desc   { font-size: .78rem; line-height: 1.55; color: var(--grau); margin-top: .18rem; }
.book-meta   { display: flex; flex-direction: column; gap: .06rem; margin-top: .3rem; }
.book-meta span   { font-family: var(--f-mono); font-size: .75rem; color: var(--grau); }
.book-meta strong { font-family: var(--f-mono); font-size: .78rem; font-weight: 600; }

/* ===== GALERIE-GRID ===== */
.gal-grid { display: grid; grid-template-columns: repeat(4,1fr); gap: 1px; background: #fff; }
.gal-item {
  cursor: pointer; background: #fff; transition: background .15s;
}
.gal-item:hover, .gal-item:focus-visible { background: var(--hellgrau); outline: none; }
.gal-img { position: relative; aspect-ratio: 1/1; overflow: hidden; background: var(--c, var(--grau)); }
.gal-img img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s; }
.gal-item:hover .gal-img img { transform: scale(1.03); }
.gal-ph {
  position: absolute; inset: 0;
  display: flex; flex-direction: column; align-items: flex-start; justify-content: flex-start;
  padding: .75rem; color: #fff; background: var(--c, var(--grau));
}
.gal-ph strong { font-family: var(--f-mono); font-size: 1rem; opacity: .55; }
.gal-ph span   { font-family: var(--f-titel); font-size: clamp(.9rem, 1.8vw, 1.3rem); font-weight: 900; line-height: .95; }
.gal-cap { padding: .38rem .6rem; }
.gal-fill { background: #fff; pointer-events: none; cursor: default; }
.gal-cap .id   { font-family: var(--f-mono); font-size: .72rem; font-weight: 600; color: var(--c, var(--grau)); }
.gal-cap .name { display: block; font-size: .8rem; font-weight: 600; }
.gal-cap .sub  { display: block; font-size: .72rem; color: var(--grau); }

/* ===== INFO-BOX / BANNER ===== */
.info-box { background: var(--hellgrau); border-left: 4px solid var(--accent, var(--rot)); padding: 1rem 1.4rem; }
.info-box p { font-size: .93rem; line-height: 1.65; }
.warn-box { background: #FFFBEA; border: 1px solid #E8C800; padding: .9rem 1.4rem; font-size: .93rem; line-height: 1.6; }

/* ===== KONTAKT-BANNER ===== */
.contact-banner {
  background: var(--hellgrau); border-left: 4px solid var(--accent, var(--rot));
  padding: 1.1rem 1.5rem;
  display: flex; align-items: center; gap: 1.5rem; flex-wrap: wrap;
  margin-top: var(--gap);
}
.contact-banner .lbl { font-family: var(--f-titel); font-size: 1.1rem; font-weight: 900; color: var(--accent, var(--rot)); letter-spacing: -.01em; white-space: nowrap; }
.contact-banner a { font-size: .92rem; color: var(--schwarz); transition: color .15s; }
.contact-banner a:hover { color: var(--accent, var(--rot)); }
.contact-banner .sep { color: var(--grau); }

/* ===== FOOTER ===== */
footer { background: #111; color: #AAA; padding: 3rem 0 1.5rem; }
.foot-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 2.5rem; margin-bottom: 2.5rem; }
.foot-brand { font-family: var(--f-titel); font-size: 1.2rem; font-weight: 900; letter-spacing: -.01em; color: #fff; margin-bottom: .55rem; }
.foot-addr { font-style: normal; font-size: .88rem; line-height: 1.8; }
.foot-label { font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: #666; margin: .6rem 0 .12rem; }
.foot-label:first-child { margin-top: 0; }
.foot-col { display: flex; flex-direction: column; }
footer a { font-size: .88rem; color: #CCC; transition: color .15s; }
footer a:hover { color: #fff; }
.foot-nav a { display: block; padding: .15rem 0; }
.foot-copy { text-align: center; font-size: .75rem; color: #444; border-top: 1px solid #222; padding-top: 1.1rem; }

/* ===== LIGHTBOX ===== */
#lb { display: none; position: fixed; inset: 0; background: rgba(0,0,0,.94); z-index: 1000; padding: 1rem; align-items: center; justify-content: center; }
#lb.open { display: flex; }
.lb-inner { position: relative; display: flex; align-items: center; gap: 1rem; max-width: 90vw; max-height: 90vh; }
.lb-content { display: flex; flex-direction: column; align-items: center; gap: .65rem; }
#lb-img { max-width: 80vw; max-height: 80vh; object-fit: contain; }
.lb-cap { display: flex; gap: 1rem; color: rgba(255,255,255,.6); font-family: var(--f-mono); font-size: .8rem; }
.lb-btn { background: none; border: none; color: #fff; cursor: pointer; font-size: 1.5rem; padding: .5rem; line-height: 1; transition: color .15s; }
.lb-btn:hover { color: var(--rot); }
#lb-close { position: absolute; top: -2.5rem; right: 0; font-size: 2rem; }
#lb-prev, #lb-next { flex-shrink: 0; font-size: 2rem; }

/* ===== BACK TO TOP ===== */
@keyframes btt-bounce {
  0%   { transform: translateY(0);    animation-timing-function: ease-out; }
  35%  { transform: translateY(-6px); animation-timing-function: ease-in; }
  100% { transform: translateY(0); }
}
#back-to-top {
  position: fixed; bottom: 1.75rem; right: 1.75rem; z-index: 200;
  width: 48px; height: 48px; border-radius: 50%;
  background: #111; border: none; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: transform .18s ease-out;
}
#back-to-top svg  { display: block; }
#back-to-top path { stroke: #fff; }
#back-to-top:hover     { transform: translateY(-4px); }
#back-to-top:hover svg { animation: btt-bounce .5s linear; }

/* ===== RESPONSIVE ===== */
@media (max-width: 899px) {
  .nav    { display: none; }
  .burger { display: flex; }
}
@media (max-width: 1023px) {
  .nav-row            { grid-template-columns: repeat(2,1fr); }
  .nav-row--center    { grid-template-columns: repeat(2,1fr); }
  .book-grid          { grid-template-columns: repeat(2,1fr); }
  .book-grid--3       { grid-template-columns: repeat(2,1fr); }
  .gal-grid           { grid-template-columns: repeat(3,1fr); }
  .foot-grid          { grid-template-columns: repeat(2,1fr); }
}
@media (max-width: 639px) {
  .nav-row            { grid-template-columns: 1fr; }
  .nav-row--center    { grid-template-columns: 1fr; }
  .tile               { aspect-ratio: 16/9; }
  .book-grid, .book-grid--3 { grid-template-columns: 1fr; }
  .gal-grid           { grid-template-columns: repeat(2,1fr); }
  .foot-grid          { grid-template-columns: 1fr; gap: 1.75rem; }
}
