/* Meier Fenster – Entwurf von Seetalwebsites
   Idee: das leere Quadrat aus dem Logo ist ein Fenster. Bilder sitzen hinter Flügeln. */

:root {
  --grund: #F2F4F6;
  --flaeche: #E5EAEE;
  --linie: #CBD3DA;
  --papier: #FAFBFC;
  --himmel: #DCE7F0;
  --text: rgb(22 32 42 / .92);
  --text-2: rgb(22 32 42 / .68);
  --text-3: rgb(22 32 42 / .48);
  --akzent: #1F6FA8;
  --akzent-dunkel: #185A8A;

  --s1: 8px; --s2: 16px; --s3: 24px; --s4: 40px; --s5: 64px; --s6: 104px;
  --rand: 20px;
  --abschnitt: 64px;
  --steg: 8px;           /* Breite zwischen den Flügeln */
  --radius: 2px;

  --expo: cubic-bezier(0.19, 1, 0.22, 1);
  --schrift: "Hanken Grotesk", "Helvetica Neue", Arial, sans-serif;
}
@media (min-width: 900px) {
  :root { --rand: 40px; --abschnitt: 128px; --steg: 12px; }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 72px; }
body {
  margin: 0;
  background: var(--grund);
  color: var(--text);
  font-family: var(--schrift);
  font-size: 17px;
  line-height: 1.55;
  letter-spacing: -0.005em;
  -webkit-font-smoothing: antialiased;
  font-feature-settings: "tnum" 0;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
button, input, textarea { font: inherit; color: inherit; }
h1, h2, p, dl, dd, figure, ol { margin: 0; padding: 0; }
:focus-visible { outline: 2px solid var(--akzent); outline-offset: 3px; }

.rand { width: 100%; max-width: calc(1200px + 2 * var(--rand)); margin: 0 auto; padding: 0 var(--rand); }

/* ---------- Kopf ---------- */
.kopf {
  position: sticky; top: 0; z-index: 100;
  height: 64px;
  background: rgb(242 244 246 / 0);
  border-bottom: 1px solid transparent;
  transition: background-color .25s ease-out, border-color .25s ease-out;
}
.kopf.ist-gescrollt {
  background: rgb(242 244 246 / .86);
  -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px);
  border-color: var(--linie);
}
.kopf-innen { height: 64px; display: flex; align-items: center; gap: var(--s3); }
.marke { display: flex; align-items: center; min-height: 44px; gap: 10px; text-decoration: none; font-weight: 500; font-size: 18px; letter-spacing: -0.02em; margin-right: auto; }
.marke-zeichen { width: 22px; height: 22px; fill: none; stroke: var(--akzent); stroke-width: 2.2; }
.nav { display: none; gap: var(--s4); }
.nav a { text-decoration: none; font-size: 15px; color: var(--text-2); transition: color .15s ease-out; }
.nav a:hover { color: var(--text); }
@media (min-width: 900px) { .nav { display: flex; } }

/* ---------- Knöpfe ---------- */
.knopf {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 48px; padding: 0 var(--s3);
  background: var(--akzent); color: #F7FAFC;
  border: 0; border-radius: var(--radius);
  font-size: 16px; font-weight: 500; letter-spacing: -0.005em;
  text-decoration: none; cursor: pointer;
  transition: background-color .15s ease-out, transform .15s ease-out;
}
.knopf:hover { background: var(--akzent-dunkel); }
.knopf:active { transform: scale(.98); }
.knopf-klein { min-height: 40px; padding: 0 var(--s2); font-size: 15px; }
/* Der Kopf-Knopf kommt erst, wenn der Knopf im Einstieg weg ist: nie zwei gleiche Knöpfe auf einem Bildschirm */
.js .kopf .knopf-klein { opacity: 0; visibility: hidden; transform: translateY(-4px); transition: opacity .25s ease-out, transform .25s ease-out, visibility 0s linear .25s, background-color .15s ease-out; }
.js .kopf.zeige-knopf .knopf-klein { opacity: 1; visibility: visible; transform: none; transition: opacity .25s ease-out, transform .25s ease-out, visibility 0s, background-color .15s ease-out; }
.textlink { display: inline-flex; align-items: center; min-height: 44px; color: var(--text); text-decoration: underline; text-decoration-color: var(--linie); text-underline-offset: 6px; text-decoration-thickness: 1px; transition: text-decoration-color .15s ease-out; }
.textlink:hover { text-decoration-color: var(--text); }

/* ---------- Einstieg ---------- */
.start { padding-top: var(--s4); padding-bottom: var(--abschnitt); }
.start-zeile { font-size: 15px; color: var(--text-2); margin-bottom: var(--s2); display: flex; align-items: center; gap: 10px; }
.start-zeile::before { content: ""; width: 9px; height: 9px; border: 1.5px solid var(--akzent); }
.titel {
  font-weight: 400;
  font-size: clamp(46px, 8.2vw, 108px);
  line-height: 1.0;
  letter-spacing: -0.04em;
  color: var(--text);
  margin-left: -0.04em;
}
.zeile { display: block; overflow: hidden; padding-bottom: 0.06em; margin-bottom: -0.06em; }
.zeile > span { display: block; }

.start-unten { margin-top: var(--s3); display: grid; gap: var(--s3); }
.start-text { max-width: 34em; color: var(--text-2); }
.start-aktion { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s3); }
@media (min-width: 900px) {
  .start { padding-top: var(--s4); }
  .start-unten { grid-template-columns: minmax(0, 1fr) auto; align-items: end; margin-top: var(--s4); gap: var(--s5); }
  .start-text { font-size: 19px; line-height: 1.5; }
}

/* Fensterfront: ein Foto, drei Flügel */
.front { position: relative; margin-top: var(--s4); }
.fluegel-reihe {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--steg);
  aspect-ratio: 4 / 5;
}
@media (min-width: 600px) { .fluegel-reihe { aspect-ratio: 16 / 10; } }
@media (min-width: 900px) { .front { margin-top: var(--s5); } .fluegel-reihe { aspect-ratio: auto; height: min(72vh, 760px); min-height: 460px; } }

.fluegel { position: relative; overflow: hidden; background: var(--flaeche); }
.fluegel-bild { position: absolute; left: 0; right: 0; bottom: -6%; height: 132%; will-change: transform; }
@media (min-width: 600px) { .fluegel-bild { height: 112%; } }
.fluegel-bild img {
  position: absolute; top: 0; height: 100%;
  width: calc(300% + 2 * var(--steg)); max-width: none;
  object-fit: cover; object-position: 62% 74%;
  transform-origin: 50% 60%;
}
.fluegel:nth-child(1) img { left: 0; }
.fluegel:nth-child(2) img { left: calc(-100% - var(--steg)); }
.fluegel:nth-child(3) img { left: calc(-200% - 2 * var(--steg)); }
.vorhang { position: absolute; inset: 0; background: var(--grund); transform-origin: 50% 0; transform: scaleY(0); pointer-events: none; }

/* Haarlinien-Rahmen mit Eckpunkten, wie ein Fensterplan */
.front-rahmen { position: absolute; inset: calc(-1 * var(--s1)); border: 1px solid var(--linie); pointer-events: none; }
.front .front-rahmen { bottom: calc(var(--s4) - var(--s1)); }
.punkt { position: absolute; width: 7px; height: 7px; background: var(--grund); border: 1px solid var(--text-3); }
.p1 { left: -4px; top: -4px; } .p2 { right: -4px; top: -4px; }
.p3 { left: -4px; bottom: -4px; } .p4 { right: -4px; bottom: -4px; }
.p5, .p6 { top: -4px; } .p7, .p8 { bottom: -4px; }
.p5, .p7 { left: calc(33.333% - 3px); } .p6, .p8 { left: calc(66.666% - 3px); }

.bildtext { font-size: 14px; line-height: 1.45; color: var(--text-3); margin-top: var(--s2); }
.front .bildtext { height: var(--s3); }

/* ---------- Abschnitte allgemein ---------- */
.abschnitt { padding: var(--abschnitt) 0; border-top: 1px solid var(--linie); }
h2 { font-weight: 400; font-size: clamp(36px, 5.6vw, 72px); line-height: 1.04; letter-spacing: -0.035em; }
.kopfzeile { display: grid; gap: var(--s2); margin-bottom: var(--s4); }
.kopf-text { color: var(--text-2); max-width: 30em; }
@media (min-width: 900px) {
  .kopfzeile { grid-template-columns: 1fr 1fr; align-items: end; margin-bottom: var(--s5); }
  .kopf-text { justify-self: end; text-align: left; max-width: 26em; }
}

/* ---------- Referenzen: eine Fassade aus Fenstern ---------- */
.filter { display: flex; flex-wrap: wrap; gap: var(--s1); margin-bottom: var(--s4); }
.chip {
  display: inline-flex; align-items: center; gap: var(--s1);
  min-height: 40px; padding: 0 var(--s2);
  background: transparent; border: 1px solid var(--linie); border-radius: var(--radius);
  font-size: 15px; color: var(--text-2); cursor: pointer;
  transition: background-color .15s ease-out, color .15s ease-out, border-color .15s ease-out;
}
.chip span { font-variant-numeric: tabular-nums; color: var(--text-3); }
.chip:hover { color: var(--text); border-color: var(--text-3); }
.chip.ist-aktiv { background: var(--text); border-color: transparent; color: var(--grund); }
.chip.ist-aktiv span { color: rgb(242 244 246 / .6); }

.fassade { list-style: none; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s4) var(--s2); }
@media (min-width: 700px) { .fassade { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (min-width: 1000px) { .fassade { grid-template-columns: repeat(5, minmax(0, 1fr)); gap: var(--s5) var(--s3); } }
.fassade li[hidden] { display: none; }

.ref { all: unset; display: block; width: 100%; cursor: zoom-in; }
.ref:focus-visible { outline: 2px solid var(--akzent); outline-offset: 4px; }
.ref-bild {
  display: block; position: relative;
  padding: 6px; background: var(--papier);
  border: 1px solid var(--linie);
}
.ref-bild::after { /* Glasleiste: innere Linie wie ein Flügelrahmen */
  content: ""; position: absolute; inset: 6px; border: 1px solid rgb(22 32 42 / .08); pointer-events: none;
}
.ref-bild img { width: 100%; aspect-ratio: 3 / 4; object-fit: cover; transition: transform .6s var(--expo), filter .15s ease-out; }
.ref:hover .ref-bild img { transform: scale(1.03); }
.ref-bild { overflow: hidden; }
.ref-text { display: grid; grid-template-columns: auto 1fr; column-gap: 10px; margin-top: var(--s2); font-size: 15px; line-height: 1.4; }
.nr { font-variant-numeric: tabular-nums; color: var(--akzent); font-weight: 500; }
.was { color: var(--text); }
.ort { grid-column: 2; color: var(--text-3); font-size: 14px; margin-top: 2px; }

/* ---------- Leistungen ---------- */
.liste { border-bottom: 1px solid var(--linie); }
.liste-zeile { display: grid; gap: var(--s1); padding: var(--s3) 0; border-top: 1px solid var(--linie); }
.liste dt { font-size: clamp(26px, 3.4vw, 40px); line-height: 1.1; letter-spacing: -0.03em; }
.liste dd { color: var(--text-2); max-width: 36em; }
@media (min-width: 900px) {
  .liste-zeile { grid-template-columns: 5fr 7fr; padding: var(--s4) 0; align-items: baseline; }
}
.marke-hinweis { margin-top: var(--s4); display: grid; gap: var(--s1); max-width: 40em; }
.marke-name { font-weight: 500; letter-spacing: -0.01em; }
.marke-hinweis p:last-child { color: var(--text-2); }
@media (min-width: 900px) { .marke-hinweis { margin-left: calc(5 / 12 * 100%); } }

/* ---------- Betrieb ---------- */
.betrieb-raster { display: grid; gap: var(--s4); }
.rahmen { padding: 6px; background: var(--papier); border: 1px solid var(--linie); }
.betrieb-bild img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.betrieb-bild .bildtext { padding: 0 var(--s1) 2px; margin-top: var(--s1); }
.betrieb-text { display: grid; gap: var(--s3); align-content: start; }
.betrieb-text .gross { font-size: clamp(24px, 2.6vw, 34px); line-height: 1.25; letter-spacing: -0.02em; color: var(--text); max-width: 22em; }
.betrieb-text p:last-child { color: var(--text-2); max-width: 32em; }
@media (min-width: 900px) {
  .betrieb-raster { grid-template-columns: 6fr 5fr; gap: var(--s5); align-items: start; }
}

/* ---------- Kontakt: der Blick nach draussen ---------- */
.kontakt { background: var(--himmel); padding: var(--abschnitt) 0; }
.kontakt-fenster {
  position: relative; display: grid; gap: var(--s5);
  background: var(--papier); border: 1px solid var(--linie);
  padding: var(--s4) var(--s3);
}
.kontakt-fenster > .front-rahmen { inset: calc(-1 * var(--s2)); border-color: rgb(22 32 42 / .14); }
.kontakt-fenster .punkt { background: var(--himmel); }
.kontakt-links { display: grid; gap: var(--s3); align-content: start; }
.kontakt-text { color: var(--text-2); max-width: 28em; }
.mail {
  font-size: clamp(30px, 3.6vw, 48px); line-height: 1.1; letter-spacing: -0.04em;
  text-decoration: none; color: var(--akzent);
  overflow-wrap: normal; padding-bottom: 4px;
  background: linear-gradient(currentColor, currentColor) 0 100% / 0% 1px no-repeat;
  transition: background-size .5s var(--expo);
  justify-self: start;
}
.mail:hover { background-size: 100% 1px; }
.mail .ganz { white-space: nowrap; }
.adresse { font-style: normal; color: var(--text-2); }
@media (min-width: 900px) {
  .kontakt-fenster { grid-template-columns: 1fr 1fr; gap: 0; padding: 0; }
  .kontakt-links { padding: var(--s5); border-right: var(--steg) solid var(--flaeche); }
  .formular { padding: var(--s5); }
}

.formular { display: grid; gap: var(--s3); }
.feld { display: grid; gap: var(--s1); border: 0; margin: 0; padding: 0; min-width: 0; }
.feld > span, .feld legend { font-size: 14px; color: var(--text-2); padding: 0; margin-bottom: var(--s1); }
.feld input, .feld textarea {
  width: 100%; padding: 12px 14px; min-height: 48px;
  background: var(--grund); border: 1px solid var(--linie); border-radius: var(--radius);
  transition: border-color .15s ease-out, background-color .15s ease-out;
}
.feld textarea { resize: vertical; }
.feld input:focus, .feld textarea:focus { outline: none; border-color: var(--akzent); background: var(--papier); }
.feld ::placeholder { color: var(--text-3); }
.wahl { display: flex; flex-wrap: wrap; gap: var(--s1); }
.wahl label { position: relative; }
.wahl input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.wahl span {
  display: inline-flex; align-items: center; min-height: 40px; padding: 0 var(--s2);
  border: 1px solid var(--linie); border-radius: var(--radius); font-size: 15px; color: var(--text-2);
  transition: background-color .15s ease-out, color .15s ease-out, border-color .15s ease-out;
}
.wahl input:checked + span { background: var(--text); color: var(--grund); border-color: transparent; }
.wahl input:focus-visible + span { outline: 2px solid var(--akzent); outline-offset: 2px; }
.knopf-voll { width: 100%; }
@media (min-width: 900px) { .knopf-voll { width: auto; justify-self: start; } }
.formular-hinweis { font-size: 14px; color: var(--text-3); }

/* ---------- Fuss ---------- */
.fuss { padding: var(--s4) 0 var(--s5); font-size: 14px; color: var(--text-3); }
.fuss-innen { display: grid; gap: var(--s1); }
.fuss a { display: inline-block; padding: 10px 0; margin: -10px 0; color: var(--text-2); text-underline-offset: 4px; }
@media (min-width: 900px) { .fuss-innen { grid-template-columns: 1fr auto; } }

/* ---------- Grosse Ansicht ---------- */
.ansicht {
  border: 0; padding: 0; margin: auto; background: transparent; color: var(--grund);
  width: min(100vw, 1400px); max-width: 100vw; max-height: 100dvh; height: 100dvh;
}
.ansicht::backdrop { background: rgb(14 20 26 / .92); }
.ansicht-innen { height: 100%; display: grid; grid-template-rows: 1fr auto; padding: var(--s2); gap: var(--s2); }
.ansicht img { width: 100%; height: 100%; min-height: 0; object-fit: contain; }
.ansicht-leiste { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: var(--s2); }
.ansicht-leiste p { font-size: 15px; color: rgb(242 244 246 / .8); }
.ansicht-knoepfe { display: flex; gap: var(--s1); }
.ansicht-knoepfe button {
  min-width: 48px; min-height: 44px; padding: 0 var(--s2);
  background: transparent; color: var(--grund); border: 1px solid rgb(242 244 246 / .3); border-radius: var(--radius);
  font-size: 18px; cursor: pointer; transition: border-color .15s ease-out;
}
.ansicht-knoepfe .zu { font-size: 15px; }
.ansicht-knoepfe button:hover { border-color: rgb(242 244 246 / .8); }
.ansicht[open] .ansicht-innen { animation: auf .35s var(--expo); }
@keyframes auf { from { opacity: 0; transform: scale(.97); } }

/* ---------- Bewegung beim Laden (nur mit JS und ohne reduzierte Bewegung) ---------- */
@media (prefers-reduced-motion: no-preference) {
  .js .zeile > span { transform: translateY(105%); }
  .js .start-zeile, .js .start-unten { opacity: 0; transform: translateY(12px); }
  .js .vorhang { transform: scaleY(1); }
  .js .fluegel-bild img { transform: scale(1.12); }

  .ist-bereit .zeile > span { transform: none; transition: transform .9s var(--expo); }
  .ist-bereit .zeile:nth-child(2) > span { transition-delay: .09s; }
  .ist-bereit .start-zeile, .ist-bereit .start-unten { opacity: 1; transform: none; transition: opacity .6s ease-out .25s, transform .9s var(--expo) .25s; }
  .ist-bereit .vorhang { transform: scaleY(0); transition: transform 1.1s var(--expo) .3s; }
  .ist-bereit .fluegel:nth-child(2) .vorhang { transition-delay: .39s; }
  .ist-bereit .fluegel:nth-child(3) .vorhang { transition-delay: .48s; }
  .ist-bereit .fluegel-bild img { transform: none; transition: transform 1.6s var(--expo) .3s; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .ansicht[open] .ansicht-innen { animation: none; }
  .ref-bild img, .mail { transition: none; }
}

/* Am Computer bleibt der Kopf-Knopf stehen (dort ist genug Platz, und die Navigation bleibt ruhig) */
@media (min-width: 900px) {
  .js .kopf .knopf-klein { opacity: 1; visibility: visible; transform: none; }
}
