@font-face {
  font-family: "Nunito";
  src: url("fonts/nunito-latin-400-normal.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: "Nunito";
  src: url("fonts/nunito-latin-ext-400-normal.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0100-02AF, U+0304, U+0308, U+0329, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

:root {
  --ink: #2f3133;
  --muted: #6f6f6f;
  --accent: #61a1c0;
  --accent-text: #3a7592;
  --line: #e4e4e2;
  --bg: #ffffff;
  --bg-soft: #f6f6f4;
  --wrap: 1120px;
  --gutter: clamp(20px, 5vw, 48px);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: 88px; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: "Nunito", system-ui, sans-serif;
  font-weight: 400;
  font-synthesis: none;
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

img { display: block; max-width: 100%; height: auto; }

a { color: inherit; text-decoration: none; }

h1, h2, h3 { font-weight: 400; margin: 0; letter-spacing: -0.01em; }

.wrap {
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

/* Kopfzeile */

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}

.logo { display: block; }
.logo-svg, .logo img { display: block; height: 40px; width: auto; overflow: visible; }



.nav { display: flex; gap: clamp(16px, 3vw, 40px); font-size: 15px; color: var(--muted); }

.nav a { position: relative; padding: 4px 0; transition: color .2s; white-space: nowrap; }

.nav a::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 1px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .25s;
}

.nav a:hover { color: var(--ink); }
.nav a:hover::after { transform: scaleX(1); }

/* Logo: Punkte fliegen beim Anklicken ein */
.logo-svg .logo-dot { transform-box: fill-box; transform-origin: center; }
.logo-svg.is-flying .logo-dot { animation: dot-fly .85s cubic-bezier(.2,.8,.25,1.15) var(--d) both; }
@keyframes dot-fly {
  0%   { transform: translate(var(--dx), var(--dy)) scale(.3); opacity: 0; }
  60%  { opacity: 1; }
  100% { transform: none; opacity: 1; }
}
@media (prefers-reduced-motion: reduce) { .logo-svg.is-flying .logo-dot { animation: none; } }

/* Startbild */

.eyebrow.hero-claim { margin-bottom: 18px; }

.hero-image {
  height: min(68vh, 640px);
  overflow: hidden;
}

.hero-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 58%;
}

.hero-text {
  padding-top: clamp(48px, 8vw, 96px);
  padding-bottom: clamp(48px, 8vw, 96px);
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: end;
}

h1 {
  font-size: clamp(34px, 5vw, 60px);
  line-height: 1.1;
}

.lead {
  margin: 0;
  font-size: clamp(17px, 1.6vw, 20px);
  color: var(--muted);
  max-width: 34em;
}


/* Startbild: Text liegt ganz im Himmel (ab Tablet-Breite) */
@media (min-width: 761px) {
  .hero { position: relative; }
  .hero-image { height: min(80vh, 52.5vw); position: relative; }
  .hero-image img { object-position: 50% 30%; }
  .hero-image::after {
    content: ""; position: absolute; inset: 0; pointer-events: none;
    background: linear-gradient(180deg, rgba(246,244,247,.55) 0%, rgba(246,244,247,.25) 30%, rgba(246,244,247,0) 45%);
  }
  .hero-text {
    position: absolute; left: 50%; transform: translateX(-50%); width: 100%; top: clamp(28px, 3.6vw, 64px);
    display: grid; grid-template-columns: 1fr 1fr; gap: 14px 48px; align-items: start;
    padding-top: 0; padding-bottom: 0; box-sizing: border-box;
  }
  .hero-claim { grid-column: 1 / -1; }
  .hero-text h1 { max-width: 11em; color: #1f2326; font-size: clamp(32px, 4.2vw, 56px); }
  .hero-text .lead { margin-top: .35em; max-width: 26em; color: #2b2f33; }
}

/* Abschnitte */

.section {
  padding: clamp(56px, 9vw, 112px) 0;
  border-top: 1px solid var(--line);
}

.section-head {
  display: flex;
  align-items: baseline;
  gap: 20px;
  margin-bottom: clamp(32px, 5vw, 56px);
}

.num {
  font-size: 14px;
  color: var(--accent-text);
  letter-spacing: 0.08em;
}

h2 { font-size: clamp(26px, 3vw, 36px); line-height: 1.2; }

.eyebrow {
  margin: 0 0 16px;
  font-size: 14px;
  color: var(--accent-text);
  letter-spacing: 0.08em;
}

.grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: clamp(32px, 6vw, 96px);
  align-items: start;
}

.col-text > p { color: var(--muted); max-width: 32em; }

.prose p { margin: 0 0 1.2em; }

.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-top: 12px;
  color: var(--ink);
  border-bottom: 1px solid var(--accent);
  padding-bottom: 4px;
}

.link-arrow::after { content: "→"; color: var(--accent); transition: transform .2s; }
.link-arrow:hover::after { transform: translateX(4px); }

/* Dienstleistungen */

.services {
  list-style: none;
  margin: 0;
  padding: 0;
  border-top: 1px solid var(--line);
}

.services li {
  padding: 18px 0;
  border-bottom: 1px solid var(--line);
  font-size: 20px;
  display: flex;
  justify-content: space-between;
}

.services li::after { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); align-self: center; }

/* Projekte */

.project-map { margin: 0 0 clamp(48px, 7vw, 88px); }
.project-map svg { display: block; width: 100%; height: auto; overflow: visible; }
.map-river { fill: none; stroke: var(--accent); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; opacity: .35; }
.map-village circle { fill: #737373; }
.map-village text { font-size: 15px; fill: var(--muted); }
.map-pin circle { fill: var(--accent); transition: transform .25s; transform-box: fill-box; transform-origin: center; }
.map-pin text { font-size: 16px; fill: var(--accent-text); }
.map-pin:hover circle, .map-pin:focus-visible circle { transform: scale(1.25); }
.map-pin:focus-visible { outline: none; }
.map-pin:focus-visible text { text-decoration: underline; }
.project-map figcaption { margin-top: 12px; font-size: 14px; color: var(--muted); display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; }
.map-other circle { fill: #fff; stroke: #61a1c0; stroke-width: 2.5; }
.map-other text { font-size: 13px; fill: #387594; }
.lg-key { display: inline-block; width: 10px; height: 10px; border-radius: 50%; }
.lg-key-blue { background: var(--accent); }
.lg-key-grey { background: #fff; border: 2.5px solid #61a1c0; box-sizing: border-box; margin-left: 10px; }
.pnum { font-size: 14px; color: var(--accent-text); letter-spacing: 0.08em; margin-right: 14px; }
.map-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
@media (max-width: 760px) { .project-map svg { width: 720px; max-width: none; } .map-minor text { display: none; } }

.project + .project { margin-top: clamp(48px, 7vw, 88px); }

.project-title {
  font-size: 18px;
  color: var(--muted);
  margin-bottom: 20px;
}

.gallery {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-auto-rows: clamp(180px, 22vw, 260px);
  grid-auto-flow: dense;
  gap: 12px;
}

.tile {
  display: block;
  overflow: hidden;
  background: var(--bg-soft);
  grid-row: span 2;
}

.tile.wide { grid-column: span 2; }
.tile.full { grid-column: 1 / -1; grid-row: span 3; }

.tile img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .5s ease;
}

.tile:hover img { transform: scale(1.03); }

.project-intro {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: clamp(24px, 5vw, 72px);
  margin-bottom: 28px;
}

.project-text p { margin: 0 0 1em; color: var(--muted); max-width: 36em; }

.facts { margin: 0; border-top: 1px solid var(--line); font-size: 15px; }
.facts div { display: grid; grid-template-columns: 7.5em 1fr; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.facts dt { color: var(--accent-text); }
.facts dd { margin: 0; }

.stage-frame {
  position: relative;
  aspect-ratio: 4 / 3;
  background: var(--bg-soft);
  overflow: hidden;
}

.stage {
  position: absolute;
  inset: 0;
  margin: 0;
  opacity: 0;
  transition: opacity .6s ease;
}

.stage.is-active { opacity: 1; }

.stage img { width: 100%; height: 100%; object-fit: contain; }

.stage-plan { background: #fff; padding: 3%; }

.stage-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
}

.stage-tabs button {
  font: inherit;
  font-size: 15px;
  color: var(--muted);
  background: none;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 8px 18px;
  min-height: 44px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  transition: color .2s, border-color .2s;
}

.stage-tabs button::before { content: ""; width: 8px; height: 8px; border-radius: 50%; border: 1px solid var(--accent); }
.stage-tabs button:hover { color: var(--ink); }
.stage-tabs button[aria-selected="true"] { color: var(--ink); border-color: var(--accent); }
.stage-tabs button[aria-selected="true"]::before { background: var(--accent); }
.stage-tabs button:focus-visible { outline: 2px solid var(--accent-text); outline-offset: 2px; }

.stage-caption { margin: 12px 0 0; font-size: 15px; color: var(--muted); }

.sketch { margin: clamp(40px, 6vw, 72px) 0 0; overflow: hidden; background: var(--bg-soft); }
.sketch img { width: 100%; aspect-ratio: 16 / 7; object-fit: cover; object-position: center 40%; }

@media (prefers-reduced-motion: reduce) { .stage { transition: none; } }

.lightbox {
  border: 0;
  padding: 0;
  max-width: 100vw;
  max-height: 100vh;
  width: 100vw;
  height: 100vh;
  background: rgba(20, 21, 22, 0.94);
}

.lightbox::backdrop { background: rgba(20, 21, 22, 0.94); }

.lightbox-open { overflow: hidden; }

.lightbox[open] { display: flex; align-items: center; justify-content: center; }

.lightbox img {
  max-width: calc(100vw - 120px);
  max-height: calc(100vh - 80px);
  object-fit: contain;
}

.lb-btn {
  position: absolute;
  background: none;
  border: 0;
  color: #fff;
  font: inherit;
  font-size: 28px;
  line-height: 1;
  padding: 16px;
  cursor: pointer;
  opacity: .7;
}

.lb-btn:hover { opacity: 1; }
.lb-close { top: 8px; right: 8px; }
.lb-prev { left: 8px; top: 50%; transform: translateY(-50%); }
.lb-next { right: 8px; top: 50%; transform: translateY(-50%); }

/* Über uns */

.team {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: clamp(24px, 4vw, 48px);
}

.person {
  padding-top: 24px;
  border-top: 1px solid var(--ink);
}

.portrait { display: block; width: 100%; max-width: 320px; aspect-ratio: 4 / 5; object-fit: cover; margin-bottom: 20px; background: var(--bg-soft); }
.portrait-empty { position: relative; }
.portrait-empty span { position: absolute; border-radius: 50%; background: var(--accent); }
.portrait-empty span:nth-child(1) { width: 14%; aspect-ratio: 1; left: 22%; top: 30%; }
.portrait-empty span:nth-child(2) { width: 8%; aspect-ratio: 1; left: 48%; top: 22%; background: #737373; }
.portrait-empty span:nth-child(3) { width: 10%; aspect-ratio: 1; left: 36%; top: 58%; }
.person h3 { font-size: 24px; margin-bottom: 8px; }
.person p { margin: 0; color: var(--muted); }

/* Kontakt */

.contact {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: clamp(24px, 4vw, 48px);
  font-size: clamp(20px, 2.2vw, 26px);
  line-height: 1.5;
}

.contact-intro { margin: 0 0 clamp(28px, 4vw, 44px); max-width: 34em; font-size: clamp(17px, 1.6vw, 20px); color: var(--muted); }

address { font-style: normal; }

.contact-links { margin: 0; }

.contact-links a {
  border-bottom: 1px solid transparent;
  transition: border-color .2s, color .2s;
}

.contact-links a:hover { color: var(--accent); border-color: var(--accent); }

/* Fusszeile */

.site-footer {
  border-top: 1px solid var(--line);
  padding: 28px 0;
  font-size: 14px;
  color: var(--muted);
}

.footer-inner { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }

.footer-inner a:hover { color: var(--ink); }

/* Impressum und Fehlerseite */

.legal-heading { font-size: clamp(26px, 3vw, 36px); line-height: 1.2; }

.error-page { min-height: 60vh; }

.error-page p { color: var(--muted); max-width: 32em; margin: 0 0 24px; }

.legal-text { max-width: 40em; color: var(--muted); }

.legal-text h2 { font-size: 20px; color: var(--ink); margin: 2em 0 0.5em; }

.legal-text a { color: var(--ink); border-bottom: 1px solid var(--line); }

.legal-text a:hover { border-color: var(--accent); }

.legal-date { margin-top: 2.5em; font-size: 14px; }

/* Handy */

@media (max-width: 760px) {
  body { font-size: 16px; }
  .header-inner { height: 64px; }
  .logo-svg, .logo img { height: 32px; }
  .nav { font-size: 13px; gap: 14px; }
  .hero-image { height: 46vh; }
  .hero-text, .grid, .team, .contact, .project-intro { grid-template-columns: 1fr; }
  .stage-tabs button { padding: 8px 14px; font-size: 14px; }
  .hero-text { gap: 20px; }
  .gallery { grid-template-columns: repeat(2, 1fr); grid-auto-rows: 42vw; gap: 8px; }
  .tile { grid-row: span 1; }
  .tile.full { grid-row: span 2; }
  .lightbox img { max-width: 100vw; max-height: calc(100vh - 120px); }
  .lb-prev, .lb-next { top: auto; bottom: 16px; transform: none; }
}

@media (max-width: 430px) {
  .logo-svg, .logo img { height: 28px; }
  .nav { gap: 10px; font-size: 12px; }
}
