/* === Lintel Webfont === */
@font-face {
  font-family: 'Lintel';
  font-weight: 400;
  font-style: normal;
  font-display: swap;
  src: url('../fonts/lintel-regular.woff2') format('woff2'),
       url('../fonts/lintel-regular.woff')  format('woff'),
       url('../fonts/lintel-regular.ttf')   format('truetype');
}
@font-face {
  font-family: 'Lintel';
  font-weight: 400;
  font-style: italic;
  font-display: swap;
  src: url('../fonts/lintel-italic.woff2') format('woff2'),
       url('../fonts/lintel-italic.woff')  format('woff'),
       url('../fonts/lintel-italic.ttf')   format('truetype');
}
@font-face {
  font-family: 'Lintel';
  font-weight: 700;
  font-style: normal;
  font-display: swap;
  src: url('../fonts/lintel-bold.woff2') format('woff2'),
       url('../fonts/lintel-bold.woff')  format('woff'),
       url('../fonts/lintel-bold.ttf')   format('truetype');
}

/* === Brand Tokens === */
:root {
  --grey:  #E6E6E6;
  --black: #474143;
  --gold:  #B7893C;
  --red:   #B12F18;
  --green: #658E0C;
  --white: #FFFFFF;
  --border-w: 4px;
  --max-w: 1080px;
}

/* === Reset === */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
a:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }

body {
  font-family: 'Lintel', Helvetica, Arial, sans-serif;
  font-size: 18px;
  background-color: var(--grey);
  color: var(--black);
  line-height: 1.6;
}

/* Eine einheitliche Größe für alle Fließtexte */
p { font-size: 1.15rem; line-height: 1.6; margin: 0 0 1em; }

/* === Layout === */
.page {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 24px 16px 64px;
}

/* === Header === */
.site-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 40px;
  flex-wrap: wrap;
}
.brand {
  font-size: 2rem;
  line-height: 0.95;
  font-weight: 400;
  margin: 0;
  text-decoration: none;
  display: inline-block;
}
.brand strong { font-weight: 700; }
.site-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 18px;
  align-items: center;
  font-size: 1.15rem;
}
.site-nav a {
  text-decoration: none;
  padding: 4px 2px;
  border-bottom: 2px solid transparent;
}
.site-nav a:hover { border-bottom-color: var(--black); }
.site-nav a[aria-current="page"] { font-weight: 700; }

/* === Home: Intro === */
.intro {
  margin: 8px 0 48px;
  max-width: 720px;
  margin-left: auto;
}
.intro p {
  text-align: justify;
  hyphens: auto;
  margin: 0;
}
.intro .credit {
  display: block;
  margin: 12px 0 0;
  text-align: right;
  font-style: italic;
  color: rgba(71,65,67,.8);
}
.intro .credit-link {
  color: var(--gold);
  font-style: normal;
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-thickness: 1.5px;
  white-space: nowrap;
}
.intro .credit-link:hover {
  color: var(--black);
  text-decoration-thickness: 2px;
}
.intro .credit-link span { margin-left: 2px; font-size: 0.9em; }
.intro hr {
  border: 0;
  border-top: 1px solid var(--black);
  margin: 16px 0 8px;
}

/* === Home: Category Tiles === */
.tiles {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
  margin-top: 32px;
}
.tile {
  display: block;
  text-decoration: none;
  color: var(--black);
  border: var(--border-w) solid var(--black);
  background: var(--white);
  transition: transform .2s ease, box-shadow .2s ease;
  overflow: hidden;
}
.tile:hover { transform: translateY(-2px); box-shadow: 0 8px 24px rgba(0,0,0,.12); }
.tile-img {
  aspect-ratio: 4 / 3;
  width: 100%;
  object-fit: cover;
  display: block;
  border-bottom: var(--border-w) solid;
}
.tile h2 {
  font-size: 1.5rem;
  margin: 0;
  padding: 12px 16px;
  font-weight: 700;
}
.tile-leuchtobjekte               { border-color: var(--gold); }
.tile-leuchtobjekte .tile-img    { border-bottom-color: var(--gold); }
.tile-autos                      { border-color: var(--black); }
.tile-autos .tile-img            { border-bottom-color: var(--black); }
.tile-figuren                    { border-color: var(--red); }
.tile-figuren .tile-img          { border-bottom-color: var(--red); }
.tile-projekte                   { border-color: var(--green); }
.tile-projekte .tile-img         { border-bottom-color: var(--green); }

/* === Category Page === */
.category-header { margin: 16px 0 32px; }
.category-header h1 {
  font-size: 2.5rem;
  font-weight: 700;
  margin: 0 0 12px;
  line-height: 1;
}
.category-header .accent {
  display: block;
  height: var(--border-w);
  width: 80px;
}
.category-header p {
  max-width: 760px;
  margin: 20px 0 0;
  text-align: justify;
  hyphens: auto;
}
.category-leuchtobjekte .accent { background: var(--gold); }
.category-autos        .accent { background: var(--black); }
.category-figuren      .accent { background: var(--red); }
.category-projekte     .accent { background: var(--green); }

/* === Gallery Grid === */
.gallery {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-top: 32px;
}
.gallery button {
  padding: 0;
  border: 0;
  background: var(--white);
  cursor: zoom-in;
  overflow: hidden;
  font: inherit;
  color: inherit;
}
.gallery img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  transition: transform .4s ease, opacity .2s ease;
  display: block;
}
.gallery button:hover img { transform: scale(1.04); opacity: .92; }

/* === Projekte === */
.project {
  margin: 56px 0;
  padding-top: 8px;
  border-top: 1px solid rgba(71,65,67,.2);
}
.project:first-of-type { border-top: 0; }
.project h2 {
  font-size: 1.75rem;
  font-weight: 700;
  margin: 0 0 12px;
}
.project p { max-width: 720px; }
.project-images {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin: 16px 0;
}
.project-images img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  cursor: zoom-in;
}
.project a.external { color: var(--green); }

/* === Lokomotive Details === */
details.loko-details {
  margin-top: 20px;
  border: 1px solid rgba(71,65,67,.25);
  padding: 16px 20px;
  background: rgba(255,255,255,.4);
}
details.loko-details summary {
  cursor: pointer;
  font-weight: 700;
  font-size: 1.15rem;
  list-style: none;
}
details.loko-details summary::-webkit-details-marker { display: none; }
details.loko-details summary::before {
  content: '▸ ';
  display: inline-block;
  transition: transform .2s ease;
  margin-right: 4px;
}
details.loko-details[open] summary::before { content: '▾ '; }
details.loko-details h3 {
  font-size: 1.25rem;
  margin: 28px 0 8px;
  font-weight: 700;
}
details.loko-details img { margin: 16px auto; max-width: 90%; }

/* === Footer === */
.site-footer {
  margin-top: 80px;
  padding-top: 24px;
  border-top: 1px solid rgba(71,65,67,.25);
  text-align: center;
  color: rgba(71,65,67,.7);
}
.site-footer img {
  width: 70px;
  margin: 0 auto 12px;
}

/* === Lightbox === */
.lb-overlay {
  position: fixed;
  inset: 0;
  background: rgba(20,20,20,.92);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 100;
  padding: 24px;
  cursor: zoom-out;
}
.lb-overlay.open { display: flex; }
.lb-overlay img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  cursor: default;
  user-select: none;
  -webkit-user-drag: none;
}
.lb-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255,255,255,.1);
  color: white;
  border: 0;
  width: 48px;
  height: 48px;
  font-size: 1.6rem;
  cursor: pointer;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}
.lb-btn:hover { background: rgba(255,255,255,.25); }
.lb-prev { left: 16px; }
.lb-next { right: 16px; }
.lb-close {
  position: absolute;
  top: 16px;
  right: 16px;
  background: transparent;
  color: white;
  border: 0;
  font-size: 2rem;
  width: 44px;
  height: 44px;
  cursor: pointer;
  line-height: 1;
}

/* === Responsive === */
@media (max-width: 720px) {
  .site-header { gap: 12px; margin-bottom: 24px; }
  .brand { font-size: 1.6rem; }
  .site-nav { gap: 4px 12px; }
  .intro { max-width: 100%; }
  .intro p { text-align: left; }
  .tiles { grid-template-columns: 1fr; gap: 16px; }
  .category-header h1 { font-size: 2rem; }
  .gallery { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .project-images { grid-template-columns: 1fr; }
  .lb-btn { width: 40px; height: 40px; font-size: 1.3rem; }
  .lb-prev { left: 4px; } .lb-next { right: 4px; }
}
@media (max-width: 420px) {
  .gallery { grid-template-columns: 1fr; }
}
