/* =========================================================================
   Jonas Blau – Portfolio
   Eine einzige Stildatei. Ganz oben stehen alle Farben, Abstaende und
   Schriftgroessen als Variablen – wer etwas aendern will, aendert sie hier
   und nicht irgendwo weiter unten im Text.
   Umbrueche: ab 932 px wird aus dem Menue ein Hamburger, ab 540 px
   stapelt sich alles untereinander. (So macht es die alte Seite auch.)
   ========================================================================= */

/* --- Schriften -------------------------------------------------------- */
/* Liegen im Ordner schriften/ und werden von dieser Seite selbst
   ausgeliefert. Es geht keine Anfrage an Google. */

@font-face {
  font-family: "Poppins";
  src: url("schriften/poppins-400-latin.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+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Poppins";
  src: url("schriften/poppins-400-latin-ext.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Poppins";
  src: url("schriften/poppins-700-latin.woff2") format("woff2");
  font-weight: 700;
  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+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Poppins";
  src: url("schriften/poppins-700-latin-ext.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* --- Stellschrauben --------------------------------------------------- */

:root {
  /* Farben */
  --farbe-text: #191919;
  --farbe-text-kraeftig: #121212;
  --farbe-grau: #999;
  --farbe-flaeche: #f2f2f2;
  --farbe-linie: #ececec;
  --farbe-grund: #fff;
  --farbe-dunkel: #191919;
  --farbe-knopf: #333;

  /* Schriften */
  --schrift-ueberschrift: "Poppins", "Avenir Next", "Century Gothic", system-ui, sans-serif;
  --schrift-text: "Poppins", "Avenir Next", "Century Gothic", system-ui, sans-serif;

  /* Masse */
  --breite-seite: 1200px;
  --breite-kopfzeile: 760px;
  --breite-text: 680px;
  --hoehe-galerie: 78vh;
  --abstand-galerie: 16px;
  --abstand-kacheln: 20px;
  --hoehe-kachel: 450px;

  /* Bewegung */
  --dauer: 0.2s;
}

/* --- Grundlagen ------------------------------------------------------- */

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: auto; }

body {
  margin: 0;
  background: var(--farbe-grund);
  color: var(--farbe-text);
  font-family: var(--schrift-text);
  font-size: 16px;
  line-height: 20px;
  -webkit-font-smoothing: antialiased;
}

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

a { color: inherit; }

:focus-visible {
  outline: 2px solid var(--farbe-text);
  outline-offset: 3px;
}

/* Nur fuer Screenreader sichtbar */
.nur-vorlesen {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

/* Sprungmarke zum Inhalt */
.sprungmarke {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 100;
  background: var(--farbe-grund);
  padding: 12px 20px;
  font-family: var(--schrift-ueberschrift);
}
.sprungmarke:focus { left: 0; }

.seite {
  width: 100%;
  max-width: var(--breite-seite);
  margin: 0 auto;
}

.inhalt {
  margin-left: 4%;
  width: 96%;
}

/* --- Kopfzeile -------------------------------------------------------- */

.kopf {
  display: flex;
  align-items: center;
  height: 90px;
  padding-top: 30px;
  position: relative;
}

.kopf-nav a {
  font-family: var(--schrift-ueberschrift);
  font-size: 17px;
  font-weight: 400;
  line-height: 30px;
  color: var(--farbe-grau);
  text-decoration: none;
  padding-right: 20px;
}
.kopf-nav a.aktiv { color: var(--farbe-text); }

.kopf-logo {
  flex: 1;
  margin: 0;
  text-align: right;
}
.kopf-logo a {
  font-family: var(--schrift-ueberschrift);
  font-size: 23px;
  font-weight: 700;
  line-height: 30px;
  color: var(--farbe-text-kraeftig);
  text-decoration: none;
}

/* Hamburger – nur auf schmalen Bildschirmen und nur mit JavaScript */
.kopf-menue {
  display: none;
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 44px; height: 44px;
  padding: 15px 10px;
  border: 0;
  background: none;
  cursor: pointer;
}
.kopf-menue span {
  display: block;
  height: 2px;
  margin-bottom: 4px;
  background: var(--farbe-text);
}
.kopf-menue span:last-child { margin-bottom: 0; }

/* --- Menue auf dem Handy ---------------------------------------------- */

.menue {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 50;
  background: var(--farbe-grund);
  padding: 70px 20px 20px;
  text-align: center;
}
.menue[data-offen] { display: block; }

.menue a {
  display: block;
  font-family: var(--schrift-ueberschrift);
  font-size: 22px;
  line-height: 32px;
  color: var(--farbe-grau);
  text-decoration: none;
  padding: 10px 0 20px;
}
.menue a.aktiv { color: var(--farbe-text); }

.menue-zu {
  position: absolute;
  top: 13px; right: 16px;
  width: 44px; height: 44px;
  border: 0;
  background: none;
  font-size: 28px;
  line-height: 1;
  color: var(--farbe-text);
  cursor: pointer;
}

/* --- Startseite: Begruessung ------------------------------------------ */

.begruessung {
  padding: 110px 0 130px;
  text-align: center;
}
.begruessung h1 {
  max-width: 800px;
  margin: 0 auto 15px;
  font-family: var(--schrift-ueberschrift);
  font-size: 60px;
  line-height: 60px;
  font-weight: 700;
  color: var(--farbe-text-kraeftig);
}
.begruessung p {
  max-width: 800px;
  margin: 0 auto;
  font-family: var(--schrift-ueberschrift);
  font-size: 20px;
  line-height: 28px;
  font-weight: 400;
  color: var(--farbe-grau);
}

/* --- Startseite: Projektkacheln --------------------------------------- */

.kacheln { display: block; }

.kachel {
  display: flex;
  height: var(--hoehe-kachel);
  margin-bottom: var(--abstand-kacheln);
  text-decoration: none;
  color: var(--farbe-text);
}
.kachel:nth-child(even) { flex-direction: row-reverse; }

.kachel-bild {
  display: block;
  position: relative;
  width: 60.1%;
  overflow: hidden;
}
.kachel-bild img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.kachel-bild::after {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--farbe-dunkel);
  opacity: 0;
  transition: opacity var(--dauer) ease;
}

.kachel-text {
  width: 39.9%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 6% 8%;
  background: var(--farbe-flaeche);
  text-align: center;
  transition: background-color var(--dauer) ease;
}
.kachel-titel {
  font-family: var(--schrift-ueberschrift);
  font-size: 20px;
  line-height: 24px;
  padding-bottom: 3px;
  transition: color var(--dauer) ease;
}
.kachel-jahr {
  font-family: var(--schrift-ueberschrift);
  font-size: 14px;
  line-height: 18px;
  color: var(--farbe-grau);
}

@media (hover: hover) {
  .kachel:hover .kachel-bild::after { opacity: 0.5; }
  .kachel:hover .kachel-text { background: var(--farbe-dunkel); }
  .kachel:hover .kachel-titel { color: #fff; }
}

/* --- Projektseite ----------------------------------------------------- */
/* Eine Mittelachse, drei Stufen: Text schmal zum Lesen, Aufmacher breiter,
   Galerie am breitesten. Nichts steht nebeneinander, was unterschiedlich
   hoch ist – daher kommen die meisten schiefen Kanten. */

.seitenkopf {
  max-width: var(--breite-kopfzeile);
  margin: 0 auto;
  padding: 34px 0 30px;
}
.seitenkopf h1 {
  margin: 0;
  font-family: var(--schrift-ueberschrift);
  font-size: 28px;
  line-height: 36px;
  font-weight: 700;
  text-align: center;
  text-wrap: balance;
}

/* Aufmacher: Video oder grosses Bild. Genauso breit und genauso hoch
   gedeckelt wie die Galeriebilder – sonst wirkt das wichtigste Bild der
   Seite kleiner als die Beiwerk-Bilder darunter. */
.medium {
  margin: 0 auto;
  text-align: center;
}
.medium img {
  width: auto;
  max-width: 100%;
  max-height: var(--hoehe-galerie);
  margin: 0 auto;
}

.video {
  position: relative;
  aspect-ratio: 16 / 9;
}
.video iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

/* Fliesstext: linksbuendig, eine bequeme Zeilenlaenge, viel Zeilenabstand.
   Zentrierter Fliesstext liest sich schlecht – jede Zeile faengt woanders an. */
.beschreibung {
  max-width: var(--breite-text);
  margin: 0 auto;
  padding-top: 44px;
  font-size: 17px;
  line-height: 29px;
  text-align: left;
  text-wrap: pretty;
}
.beschreibung p { margin: 0 0 20px; }
.beschreibung p:last-child { margin-bottom: 0; }
/* Im Original steht vor diesem Absatz eine Leerzeile. */
.beschreibung .abstand-oben {
  margin-top: 24px;
  color: var(--farbe-grau);
}

/* Knopf, z. B. "Spiel oeffnen" */
.knopf-zeile {
  margin: 34px 0 0;
  text-align: center;
}
.knopf {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 50px;
  padding: 0 28px;
  border: 0;
  border-radius: 100px;
  background: var(--farbe-knopf);
  color: #fff;
  font-family: var(--schrift-ueberschrift);
  font-size: 16px;
  text-decoration: none;
  cursor: pointer;
  transition: opacity var(--dauer) ease;
}
@media (hover: hover) {
  .knopf:hover { opacity: 0.85; }
}

/* --- Galerie ---------------------------------------------------------- */
/* Ein Bild je Zeile. Sehr hohe Bilder werden gedeckelt, damit ein
   Hochformat nicht die ganze Seite sprengt. */

.galerie {
  margin: 72px 0 0;
}
.galerie figure {
  margin: 0 0 var(--abstand-galerie);
  text-align: center;
}
.galerie a {
  display: inline-block;
  max-width: 100%;
  overflow: hidden;
  vertical-align: top;
}
.galerie img {
  width: auto;
  max-width: 100%;
  max-height: var(--hoehe-galerie);
  margin: 0 auto;
}

/* Die Bildunterschrift steht sichtbar darunter, nicht erst beim
   Darueberfahren – auf dem Handy gibt es kein Darueberfahren. */
.galerie figcaption {
  padding-top: 10px;
  font-family: var(--schrift-ueberschrift);
  font-size: 13px;
  line-height: 18px;
  color: var(--farbe-grau);
}

/* --- Sanftes Einblenden beim Scrollen --------------------------------- */
/* Der Ausgangszustand wird von seite.js gesetzt, nicht hier. Wenn das
   JavaScript nicht laeuft, ist der Inhalt also ganz normal da – unsichtbare
   Textbloecke waeren der schlimmste denkbare Fehler auf einer
   Bewerbungsseite. */

.einblenden {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.5s ease, transform 0.5s ease;
  will-change: opacity, transform;
}
.einblenden.sichtbar {
  opacity: 1;
  transform: none;
}

/* --- Lightbox --------------------------------------------------------- */

.lightbox {
  width: 100vw;
  max-width: 100vw;
  height: 100dvh;
  max-height: 100dvh;
  margin: 0;
  padding: 0;
  border: 0;
  background: rgba(255, 255, 255, 0.97);
  overflow: hidden;
}
.lightbox::backdrop { background: rgba(255, 255, 255, 0.97); }

.lightbox-rahmen {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  /* Seitlich so viel Platz, dass die Pfeile nicht auf dem Bild liegen. */
  padding: 64px 80px;
}
.lightbox img {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
}
.lightbox-pfeil {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  border: 0;
  border-radius: 56px;
  background: rgba(0, 0, 0, 0.08);
  cursor: pointer;
  transition: background-color var(--dauer) ease;
}
.lightbox-zurueck { left: 12px; }
.lightbox-vor { right: 12px; }
.lightbox-pfeil svg { width: 26px; height: 26px; fill: var(--farbe-text); }
.lightbox-pfeil[hidden] { display: none; }
@media (hover: hover) {
  .lightbox-pfeil:hover { background: rgba(0, 0, 0, 0.16); }
}

/* Auf schmalen Bildschirmen rueckt alles dichter zusammen. */
@media (max-width: 640px) {
  .lightbox-rahmen { padding: 60px 14px 72px; }
  .lightbox-pfeil { width: 44px; height: 44px; }
  .lightbox-zurueck { left: 6px; }
  .lightbox-vor { right: 6px; }
}

.lightbox-zu {
  position: absolute;
  top: 10px; right: 10px;
  width: 44px; height: 44px;
  border: 0;
  background: none;
  font-size: 28px;
  line-height: 1;
  color: var(--farbe-text);
  cursor: pointer;
}
.lightbox-text {
  position: absolute;
  bottom: 16px; left: 0; right: 0;
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 4px 14px;
  padding: 0 20px;
  text-align: center;
  font-family: var(--schrift-ueberschrift);
  font-size: 13px;
  line-height: 16px;
  color: var(--farbe-text);
}
.lightbox-zaehler { color: var(--farbe-grau); }

/* --- "You may also like" ---------------------------------------------- */

.weitere {
  margin-top: 90px;
  padding-top: 44px;
  border-top: 1px solid var(--farbe-linie);
}

.weitere h2 {
  margin: 0 0 30px;
  font-family: var(--schrift-ueberschrift);
  font-size: 20px;
  line-height: 20px;
  font-weight: 700;
}

.weitere-liste {
  display: flex;
  flex-wrap: wrap;
  gap: var(--abstand-kacheln);
}

.weitere-kachel {
  display: block;
  /* vier Kacheln nebeneinander, dazwischen je ein Abstand */
  width: calc((100% - 3 * var(--abstand-kacheln)) / 4);
  text-decoration: none;
  color: var(--farbe-text);
}
.weitere-bild {
  display: block;
  position: relative;
  aspect-ratio: 1000 / 749;
  overflow: hidden;
}
.weitere-bild img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.weitere-bild::after {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--farbe-dunkel);
  opacity: 0;
  transition: opacity var(--dauer) ease;
}

.weitere-text {
  display: block;
  background: var(--farbe-flaeche);
  padding: 11% 8%;
  text-align: center;
  transition: background-color var(--dauer) ease;
}
.weitere-titel {
  display: block;
  font-family: var(--schrift-ueberschrift);
  font-size: 16px;
  line-height: 20px;
  padding-bottom: 3px;
  transition: color var(--dauer) ease;
}
.weitere-jahr {
  display: block;
  font-family: var(--schrift-ueberschrift);
  font-size: 14px;
  line-height: 18px;
  color: var(--farbe-grau);
}

@media (hover: hover) {
  .weitere-kachel:hover .weitere-bild::after { opacity: 0.5; }
  .weitere-kachel:hover .weitere-text { background: var(--farbe-dunkel); }
  .weitere-kachel:hover .weitere-titel { color: #fff; }
}

/* --- Kontaktseite ----------------------------------------------------- */

.kontakt {
  max-width: 620px;
  margin: 0 auto;
  padding-bottom: 20px;
  text-align: center;
}
.kontakt p { margin: 0 0 20px; line-height: 25px; }
.kontakt .adresse {
  font-family: var(--schrift-ueberschrift);
  font-size: 20px;
  line-height: 28px;
  word-break: break-word;
}
.kontakt .adresse a { text-decoration: underline; }

/* Der Knopf schreibt eine Mail. Er taucht erst auf, wenn JavaScript ihm
   die Adresse eingesetzt hat – sonst stuende da ein Knopf ohne Funktion.
   Die Adresse selbst steht immer lesbar in der Seite. */
.knopf-mail { display: none; }
.knopf-mail.bereit { display: inline-flex; }

/* --- Fusszeile -------------------------------------------------------- */

.fuss {
  padding: 130px 0;
  text-align: center;
  font-family: var(--schrift-ueberschrift);
  font-size: 16px;
  line-height: 30px;
  color: var(--farbe-grau);
}
.fuss p { margin: 0; }
.fuss a { color: var(--farbe-grau); }

/* --- Nach oben -------------------------------------------------------- */

.nach-oben {
  position: fixed;
  right: 40px;
  bottom: 40px;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 60px;
  height: 60px;
  border-radius: 60px;
  background: rgba(0, 0, 0, 0.1);
  transition: background-color var(--dauer) ease;
}
.nach-oben svg { width: 24px; height: 24px; fill: #000; opacity: 0.3; }
@media (hover: hover) {
  .nach-oben:hover { background: rgba(0, 0, 0, 0.2); }
  .nach-oben:hover svg { opacity: 0.5; }
}

/* --- Feinschliff beim Darueberfahren ---------------------------------- */
/* Nur fuer Geraete mit echter Maus. Auf dem Handy passiert nichts, damit
   nach einem Tippen kein Zustand haengenbleibt. */

@media (hover: hover) {
  .kachel-bild img,
  .weitere-bild img,
  .galerie a img {
    transition: transform 0.5s ease;
  }
  .kachel:hover .kachel-bild img,
  .weitere-kachel:hover .weitere-bild img,
  .galerie a:hover img {
    transform: scale(1.04);
  }
}

/* --- Weiche Seitenuebergaenge ----------------------------------------- */
/* Browser, die das nicht koennen, springen wie bisher hart um. */

@view-transition { navigation: auto; }

::view-transition-old(root),
::view-transition-new(root) {
  animation-duration: 0.22s;
}

/* --- Beim Drucken ist alles sichtbar ---------------------------------- */

@media print {
  .einblenden { opacity: 1 !important; transform: none !important; }
  .nach-oben, .kopf-menue, .menue { display: none !important; }
}

/* =========================================================================
   Ab hier schmalere Bildschirme
   ========================================================================= */

@media (max-width: 932px) {
  .seite { width: 100%; }
  .inhalt { margin: 0; padding: 0 20px; width: 100%; }

  .kopf { height: 70px; padding-top: 0; }
  .kopf-logo { text-align: left; }
  .kopf-logo a { font-size: 21px; line-height: 22px; }

  /* Ohne JavaScript bleibt das normale Menue stehen, mit JavaScript
     uebernimmt der Hamburger. */
  .js .kopf-nav { display: none; }
  .js .kopf-menue { display: block; }

  .begruessung { padding: 44px 0 40px; }
  .begruessung h1 { font-size: 28px; line-height: 28px; margin-bottom: 11px; }
  .begruessung p { font-size: 14px; line-height: 20px; }

  .kachel { height: 360px; }
  .kachel-titel { font-size: 17px; line-height: 20px; padding-bottom: 5px; }
  .kachel-jahr { font-size: 14px; line-height: 20px; }

  .seitenkopf { padding: 26px 0 22px; max-width: 100%; }
  .seitenkopf h1 { font-size: 22px; line-height: 29px; }

  .beschreibung { font-size: 16px; line-height: 27px; padding-top: 30px; }
  .beschreibung p { margin-bottom: 17px; }
  .knopf-zeile { margin-top: 26px; }

  .galerie { margin-top: 48px; }

  .weitere { margin-top: 56px; padding-top: 34px; }
  .weitere h2 { font-size: 17px; line-height: 17px; margin-bottom: 18px; }
  .weitere-kachel { width: calc((100% - var(--abstand-kacheln)) / 2); }
  .weitere-titel { font-size: 14px; line-height: 20px; padding-bottom: 5px; }

  .fuss { padding: 48px 0; font-size: 14px; line-height: 20px; }

  .nach-oben { display: none; }
}

@media (max-width: 540px) {
  .begruessung { padding: 38px 0 34px; }
  .begruessung h1 { font-size: 25px; line-height: 25px; margin-bottom: 10px; }

  .kachel,
  .kachel:nth-child(even) {
    flex-direction: column;
    height: auto;
  }
  .kachel-bild { width: 100%; aspect-ratio: 1000 / 749; }
  .kachel-text { width: 100%; padding: 21px 28px; }
  .kachel-titel { font-size: 14px; line-height: 17px; padding-bottom: 4px; }

  .seitenkopf { padding: 22px 0 18px; }
  .seitenkopf h1 { font-size: 19px; line-height: 26px; }

  .beschreibung { font-size: 16px; line-height: 26px; padding-top: 24px; }

  .galerie { margin-top: 36px; }

  .weitere { margin-top: 44px; padding-top: 29px; }
  .weitere h2 { font-size: 14px; line-height: 14px; margin-bottom: 16px; }
  .weitere-kachel { width: 100%; }

  .fuss { padding: 41px 0; }
}

/* =========================================================================
   Wer in seinem System "Bewegung reduzieren" eingeschaltet hat,
   bekommt keine Uebergaenge.
   ========================================================================= */

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }

  /* Auch der Seitenuebergang faellt dann weg. */
  ::view-transition-group(*),
  ::view-transition-old(*),
  ::view-transition-new(*) {
    animation: none !important;
  }

  /* Sicherheitsnetz: falls doch etwas eingeblendet werden sollte,
     ist es trotzdem sofort da. */
  .einblenden { opacity: 1 !important; transform: none !important; }
}
