/* LE-Architektur – schlicht, ruhig, bildstark */
@font-face { font-family: "D-DIN"; src: url(fonts/D-DIN.otf) format("opentype"); font-weight: 100 500; font-display: swap; }
@font-face { font-family: "D-DIN"; src: url(fonts/D-DIN-Bold.otf) format("opentype"); font-weight: 600 900; font-display: swap; }

:root {
  --ink: #333;
  --muted: #8a8a8a;
  --accent: #4e1717;     /* Titel, wie heutige Website */
  --green: #739471;      /* Menü-Symbol */
  --line: #e6e6e6;
  --max: 1240px;
  --gap: 14px;
  --pad: clamp(20px, 5vw, 80px);
  /* Schrift: D-DIN (frei, SIL OFL, liegt in fonts/) – sehen alle Besucher gleich.
     Zurück zu DIN Pro (nur mit Webfont-Lizenz): die zweite Zeile aktivieren, die erste löschen. */
  --font: "D-DIN", "DIN Pro", "Helvetica Neue", Arial, sans-serif;
  /* --font: "DIN Pro", "DINPro", "Inter", "Helvetica Neue", Arial, sans-serif; */
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; color: var(--ink); background: #fff;
  font: 300 15px/1.65 var(--font);
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
a:hover { color: var(--accent); }
h1, h2 { font-family: var(--font); font-weight: 300; color: var(--accent); letter-spacing: -.5px; margin: 0; }
main { padding: 0 var(--pad); }

/* ---------- Kopf ---------- */
.site-header {
  /* gleiche Flucht wie der Inhalt: gleiche Breite, gleicher Randabstand */
  width: calc(100% - 2 * var(--pad)); max-width: var(--max); margin: 0 auto; padding: 26px 0 10px;
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  position: relative; z-index: 20;
}
.logo img { height: 38px; width: auto; }
.menu-toggle {
  width: 26px; height: 20px; padding: 0; border: 0; background: none; cursor: pointer;
  display: flex; flex-direction: column; justify-content: space-between;
}
.menu-toggle span { height: 2px; background: var(--green); transition: transform .3s, opacity .3s; }
.menu-open .menu-toggle span:nth-child(1) { transform: translateY(9px) rotate(45deg); }
.menu-open .menu-toggle span:nth-child(2) { opacity: 0; }
.menu-open .menu-toggle span:nth-child(3) { transform: translateY(-9px) rotate(-45deg); }
.site-nav {
  position: fixed; inset: 0; background: #fff;
  display: flex; align-items: center; justify-content: center;
  opacity: 0; pointer-events: none; transition: opacity .35s; z-index: -1;
}
.menu-open .site-nav { opacity: 1; pointer-events: auto; }
.site-nav ul { list-style: none; margin: 0; padding: 0; text-align: center; }
.site-nav a {
  display: block; padding: 10px 0; font: 200 clamp(28px, 5vw, 44px)/1.2 var(--font);
  letter-spacing: .02em; text-transform: uppercase; color: var(--ink);
}
.site-nav a[aria-current], .site-nav a:hover { color: var(--accent); }
.menu-open { overflow: hidden; }

/* ---------- Startseite ---------- */
.home-top {
  max-width: var(--max); margin: 20px auto 0;
  display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--gap);
}
.slideshow {
  position: relative; grid-column: span 2; aspect-ratio: 1; overflow: hidden; background: #f4f4f4;
}
.slide { position: absolute; inset: 0; opacity: 0; transition: opacity 1.2s ease; }
.slide.is-active { opacity: 1; }
.slide img { width: 100%; height: 100%; object-fit: cover; }
.slide-prev, .slide-next {
  position: absolute; top: 50%; transform: translateY(-50%); z-index: 2;
  border: 0; background: none; color: #fff; font: 200 44px/1 var(--font);
  padding: 10px 14px; cursor: pointer; text-shadow: 0 0 12px rgba(0,0,0,.35);
}
.slide-prev { left: 4px; } .slide-next { right: 4px; }

.intro { text-align: center; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 20px 0; }
.sketch-logo { width: min(220px, 70%); margin: 0 auto 30px; }
.intro h1 { font-size: clamp(30px, 4vw, 38px); }
.intro h1::after { content: ""; display: block; width: 160px; height: 1px; background: var(--accent); margin: 12px auto 0; opacity: .6; }
.tagline { margin: 18px 0 0; color: #b5b5b5; text-transform: uppercase; letter-spacing: .08em; font-size: 15px; font-weight: 200; }

.tiles { max-width: var(--max); margin: var(--gap) auto 90px; display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--gap); }
.tile { position: relative; aspect-ratio: 1; overflow: hidden; }
.tile img { width: 100%; height: 100%; object-fit: cover; transition: transform .8s ease, filter .5s; }
.tile span, .project-tile span {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; text-align: center;
  color: #fff; font: 400 14px/1.3 var(--font); letter-spacing: .1em; text-transform: uppercase;
  text-shadow: 0 0 14px rgba(0,0,0,.45); padding: 0 12px;
}
.tile:hover img, .project-tile:hover img { transform: scale(1.03); filter: brightness(.85); }
.tile:hover span, .project-tile:hover span { color: #fff; }

/* ---------- Projektübersicht ---------- */
.projects { max-width: var(--max); margin: 30px auto 0; display: flex; flex-direction: column; gap: var(--gap); }
.project-row { display: flex; align-items: center; gap: var(--gap); }
.project-row.right { flex-direction: row-reverse; }        /* Bild rechts, Plan links */
.project-tile { position: relative; display: block; width: 55%; flex: none; aspect-ratio: 16 / 11; overflow: hidden; }
.project-plan { flex: 1; margin: 0 0 44px; position: relative; display: flex; flex-direction: column; align-items: center; padding: 0 1%; color: var(--muted); }   /* margin unten = Block etwas höher; Titel direkt unter dem Planfeld */
/* Planfeld: bei allen Projekten gleich hoch (4:3, = FELD in karte/projektfigur.py), Plan darin mittig → Titel überall auf gleicher Höhe */
.project-plan .feld { width: 100%; aspect-ratio: 4 / 3; display: flex; align-items: center; justify-content: center; }
.project-plan span { margin-top: 2px;   /* direkt unter dem Planfeld = knapp unter dem höchsten Plan (Campus) */ font-size: 12px; letter-spacing: .1em; text-transform: uppercase; text-align: center; transition: color .3s; }
.project-plan:hover span { color: var(--ink); }
.project-plan .figur { display: block; height: auto; overflow: visible; }   /* Breite pro Projekt aus projektfigur.py */
.project-tile img { width: 100%; height: 100%; object-fit: cover; transition: transform .8s ease, filter .5s; }
.project-tile.ganz img { object-fit: contain; background: #fff; }   /* Pläne/Schnitte ungeschnitten */
.project-tile:first-child { margin-top: 0; }

.design { max-width: var(--max); margin: 110px auto 80px; }
.section-title { text-align: center; font-size: 30px; margin-bottom: 40px; }
.design-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 28px var(--gap); }
.design-item { margin: 0; cursor: zoom-in; }
.design-item img { aspect-ratio: 1; width: 100%; object-fit: cover; transition: filter .4s; }
.design-item:hover img { filter: brightness(.9); }
.design-item figcaption { margin-top: 8px; font-size: 12px; letter-spacing: .08em; text-transform: uppercase; }
.design-item em { display: block; font-style: normal; text-transform: none; letter-spacing: 0; color: var(--muted); }

/* ---------- Projektseite ---------- */
.page-title { text-align: center; font-size: clamp(28px, 4vw, 40px); margin: 30px 0 40px; }
.project { max-width: var(--max); margin: 0 auto; }
.collage { display: grid; gap: var(--gap); grid-template-columns: 1fr 1fr; max-width: var(--max); margin: 0 auto; }
.collage img { width: 100%; height: 100%; object-fit: cover; cursor: zoom-in; }
/* wie alte Website: Bild 1 oben links, Bild 2 unten links, Bild 3 rechts in voller Höhe */
.collage.n3 .c0 { grid-column: 1; grid-row: 1; aspect-ratio: 4 / 3; }
.collage.n3 .c1 { grid-column: 1; grid-row: 2; aspect-ratio: 4 / 3; }
.collage.n3 .c2 { grid-column: 2; grid-row: 1 / span 2; }
.collage.n1 { grid-template-columns: 1fr; }
.collage.n2 img { aspect-ratio: 4 / 3; }

.project-info { max-width: var(--max); margin: 50px auto 60px; display: grid; grid-template-columns: 1fr 2fr; gap: 40px; }
.facts p { margin: 0 0 4px; font-size: 13px; color: var(--muted); }
.facts .year { color: var(--accent); font-size: 15px; margin-bottom: 10px; }
.text { max-width: 760px; }
.text p { margin: 0 0 1em; }

.wide-wrap img { width: 100%; cursor: zoom-in; }
.pano-top { max-width: var(--max); margin: 0 auto var(--gap); }
.pano-top img, .project-grid .pano img { width: 100%; cursor: zoom-in; }
.project-grid .pano { grid-column: 1 / -1; }
.project-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--gap); margin-top: var(--gap); align-items: start; }
.project-grid img { width: 100%; cursor: zoom-in; }
.project-grid { grid-auto-flow: dense; }
.project-grid .cell:not(.pano):not(.tall) img { aspect-ratio: 1; object-fit: cover; }   /* immer quadratisch */
.project-grid .cell.tall { grid-column: 2; grid-row: 1 / span 3; align-self: stretch; }
.project-grid .cell.tall img { height: 100%; object-fit: cover; }
.back { text-align: center; margin: 60px 0 80px; font-size: 13px; letter-spacing: .08em; text-transform: uppercase; }

/* ---------- Büro ---------- */
.buero-images { max-width: var(--max); margin: 30px auto 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--gap); }
.buero-images img { aspect-ratio: 3 / 4; object-fit: cover; width: 100%; cursor: zoom-in; }
.person { max-width: var(--max); margin: 70px auto 90px; display: grid; grid-template-columns: 2fr 3fr; gap: 50px; align-items: start; }
.portrait { width: 80%; aspect-ratio: 1; object-fit: cover; border-radius: 50%; margin: 0 auto; }
.person h1 { font-size: 30px; }
.roles { text-transform: uppercase; letter-spacing: .06em; font-size: 13px; color: var(--muted); }
.person h2 { font-size: 20px; margin: 40px 0 14px; }
.cv { list-style: none; margin: 0; padding: 0; font-size: 13px; }
.cv li { display: grid; grid-template-columns: 95px 1fr; gap: 12px; padding: 4px 0; }
.cv li span:first-child { color: var(--muted); }

/* ---------- Kontakt ---------- */
.kontakt { max-width: 700px; margin: 40px auto 90px; text-align: center; }
.kontakt h1 { font-size: 38px; margin-bottom: 24px; }
.kontakt p { margin: 4px 0; }
.kontakt { margin-bottom: 50px; }
.map-link { font-size: 13px; color: var(--muted); }
.kontakt-grid { max-width: var(--max); margin: 0 auto 90px; display: grid; grid-template-columns: 1fr 1fr; gap: var(--gap); }
.kontakt-bild img { width: 100%; aspect-ratio: 1; object-fit: cover; }
.map { position: relative; display: block; aspect-ratio: 1; overflow: hidden; }
.map img { width: 100%; height: 100%; object-fit: cover; }
.map-credit { position: absolute; right: 8px; bottom: 6px; font-size: 10px; color: var(--muted); background: rgba(255,255,255,.8); padding: 1px 5px; }

/* ---------- Fuss ---------- */
.site-footer { border-top: 1px solid var(--line); text-align: center; padding: 36px var(--pad) 46px; font-size: 12px; color: var(--muted); }
.site-footer img { height: 26px; width: auto; margin: 0 auto 14px; opacity: .8; }

/* ---------- Galerie (Vollbild) ---------- */
.lightbox {
  position: fixed; inset: 0; z-index: 100; background: rgba(255,255,255,.98);
  display: flex; align-items: center; justify-content: center; opacity: 0; pointer-events: none; transition: opacity .3s;
}
.lightbox.open { opacity: 1; pointer-events: auto; }
.lightbox img { max-width: calc(100vw - 120px); max-height: calc(100vh - 90px); width: auto; height: auto; object-fit: contain; }
.lightbox button {
  position: absolute; border: 0; background: none; cursor: pointer; color: var(--ink);
  font: 200 40px/1 var(--font); padding: 14px 18px;
}
.lightbox .lb-close { top: 8px; right: 10px; font-size: 34px; }
.lightbox .lb-prev { left: 6px; top: 50%; transform: translateY(-50%); }
.lightbox .lb-next { right: 6px; top: 50%; transform: translateY(-50%); }
.lightbox .lb-count { position: absolute; bottom: 18px; left: 0; right: 0; text-align: center; font-size: 12px; color: var(--muted); }

/* ---------- sanftes Einblenden ---------- */
.js .reveal { opacity: 0; transform: translateY(24px); transition: opacity .9s ease, transform .9s ease; }
.js .reveal.visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .js .reveal { opacity: 1; transform: none; transition: none; }
  .slide { transition: none; }
}

/* ---------- Handy ---------- */
@media (max-width: 800px) {
  .home-top { grid-template-columns: 1fr; }
  .slideshow { grid-column: auto; }
  .intro { padding: 50px 0 30px; }
  .logo img { height: 30px; }
  .tiles { grid-template-columns: 1fr; max-width: 480px; }
  .tile { aspect-ratio: 16 / 10; }
  .project-row, .project-row.right { flex-direction: column; align-items: stretch; }
  .project-tile { width: 100%; }
  .project-plan { padding: 10px 0 28px; margin: 0; }
  .project-plan .feld { width: 80%; }
  .design-grid { grid-template-columns: repeat(2, 1fr); }
  .project-info, .person { grid-template-columns: 1fr; gap: 24px; }
  .project-grid, .buero-images { grid-template-columns: 1fr 1fr; }
  .project-grid .cell.tall { grid-column: auto; grid-row: span 2; }
  .kontakt-grid { grid-template-columns: 1fr; }
  .lightbox img { max-width: 100vw; }
  .lightbox .lb-prev, .lightbox .lb-next { top: auto; bottom: 0; transform: none; }
}
