/*
Theme Name: Morawetz
Description: Schlankes Theme für matthiasmorawetz.de, nachgebaut nach dem Squarespace-Template (Brine-Familie).
Author: Matthias Morawetz
Version: 1.0.0
Requires at least: 6.5
Requires PHP: 8.1
Text Domain: morawetz
*/

/* ---------- Schrift ---------- */
@font-face { font-family: "Barlow Semi Condensed"; font-style: normal; font-weight: 400; font-display: swap;
  src: url(fonts/barlow-semi-condensed-400-latin.woff2) format("woff2");
  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: "Barlow Semi Condensed"; font-style: normal; font-weight: 400; font-display: swap;
  src: url(fonts/barlow-semi-condensed-400-latin-ext.woff2) format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1E00-1E9F, U+20A0-20AB, U+20AD-20C4, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Barlow Semi Condensed"; font-style: normal; font-weight: 500; font-display: swap;
  src: url(fonts/barlow-semi-condensed-500-latin.woff2) format("woff2");
  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: "Barlow Semi Condensed"; font-style: normal; font-weight: 500; font-display: swap;
  src: url(fonts/barlow-semi-condensed-500-latin-ext.woff2) format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1E00-1E9F, U+20A0-20AB, U+20AD-20C4, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Barlow Semi Condensed"; font-style: normal; font-weight: 600; font-display: swap;
  src: url(fonts/barlow-semi-condensed-600-latin.woff2) format("woff2");
  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: "Barlow Semi Condensed"; font-style: normal; font-weight: 600; font-display: swap;
  src: url(fonts/barlow-semi-condensed-600-latin-ext.woff2) format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1E00-1E9F, U+20A0-20AB, U+20AD-20C4, U+2C60-2C7F, U+A720-A7FF; }

:root {
  /* Wird durch Adobe Fonts (Katarine) ersetzt, sobald im Customizer eine Projekt-ID eingetragen ist */
  --mm-schrift: "Barlow Semi Condensed", "Helvetica Neue", Arial, sans-serif;
  --mm-gewicht: 400;
  --mm-text: #222;
  --mm-grau: #999;
  --mm-nav: #bbb;
  --mm-nav-aktiv: #333;
  --mm-linie: #ccc;
  --mm-rand: 3vw;
}

/* ---------- Grundlagen ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: #fff;
  color: var(--mm-text);
  font-family: var(--mm-schrift);
  font-weight: var(--mm-gewicht);
  font-size: 16px;
  line-height: 2;
  letter-spacing: .06em;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
p { margin: 20px 0 25.6px; }
p:first-child { margin-top: 0; }
h1, h2, h3, h4 { font-weight: 500; margin: 0 0 .6em; }
h1 { font-size: calc(10px + 1.17vw); line-height: 1.6; letter-spacing: .12em; }
h2 { font-size: calc(8px + .94vw); line-height: 32px; letter-spacing: .12em; font-weight: 400; margin: 16.6px 0; }
h3 { font-size: 16px; line-height: 1.5; letter-spacing: .08em; }
.screen-reader-text { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.mm-skip:focus { position: fixed; top: 8px; left: 8px; z-index: 100; background: #fff; padding: 6px 12px; width: auto; height: auto; clip: auto; }

/* ---------- Kopf ---------- */
.mm-kopf {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: var(--mm-rand) var(--mm-rand) 0;
  position: relative;
  z-index: 20;
}
.mm-logo img { height: 64px; width: auto; }
.mm-logo-text { font-size: 22px; letter-spacing: .12em; }
.mm-nav { margin-top: -2px; }
.mm-nav ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 17px; }
.mm-nav a {
  display: block;
  font-size: 15px;
  line-height: 18px;
  letter-spacing: .06em;
  color: var(--mm-nav);
  transition: color .2s;
}
.mm-nav a:hover,
.mm-nav .current-menu-item > a,
.mm-nav .current_page_item > a { color: var(--mm-nav-aktiv); }
.mm-menue-knopf { display: none; }

/* ---------- Startseite: Bildstreifen ---------- */
.mm-streifen { margin: var(--mm-rand) 0 0; padding: 0; list-style: none; }
.mm-streifen li + li { margin-top: 2px; }
.mm-streifen a {
  display: block;
  position: relative;
  height: calc(204px + 4.7vw);
  overflow: hidden;
  background: var(--mm-bg, #e9e3de);
}
.mm-streifen img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: var(--mm-fokus, 50% 50%);
  transition: opacity .3s cubic-bezier(.33, 0, .2, 1);
}
.mm-streifen .mm-streifen-titel {
  position: absolute;
  left: 3.5vw;
  bottom: 3.5vw;
  margin: 0;
  font-size: 18px;
  line-height: 1.3;
  letter-spacing: .1em;
  font-weight: 600;
  color: var(--mm-text);
  opacity: 0;
  transition: opacity .3s cubic-bezier(.33, 0, .2, 1);
}
/* Bild unter dem Titel ist dunkel → weiße Schrift (wird per JavaScript gemessen) */
.mm-streifen a.mm-dunkel .mm-streifen-titel { color: #fff; text-shadow: 0 0 12px rgba(0, 0, 0, .25); }
.mm-streifen a.mm-hell .mm-streifen-titel { text-shadow: 0 0 12px rgba(255, 255, 255, .35); }
.mm-streifen a:hover img,
.mm-streifen a:focus-visible img { opacity: .75; }
.mm-streifen a:hover .mm-streifen-titel,
.mm-streifen a:focus-visible .mm-streifen-titel { opacity: 1; }

/* ---------- Projektseite ---------- */
.mm-projekt-titel {
  max-width: 33%;
  margin: 0 auto;
  padding: calc(var(--mm-rand) + 6px) 0 calc(var(--mm-rand) + 23px);
  text-align: center;
  font-size: 22px;
  line-height: 1.6;
  letter-spacing: .12em;
  font-weight: 500;
}
.mm-projekt .wp-block-image { margin: 0; }
.mm-projekt .wp-block-image img { width: 100%; }
.mm-projekt .wp-block-image.mm-hoch { width: 50%; margin: 12vw auto 0; }
.mm-projekt .wp-block-image.mm-hoch + .wp-block-image:not(.mm-hoch) { margin-top: 12vw; }
.mm-projekt .wp-block-image figcaption { text-align: center; font-size: 14px; color: var(--mm-grau); margin: 10px var(--mm-rand) 0; }

/* sanftes Einblenden beim Scrollen (nur mit JavaScript) */
.js .mm-einblenden { opacity: 0; transition: opacity 1s cubic-bezier(.33, 0, .2, 1); }
.js .mm-einblenden.mm-sichtbar { opacity: 1; }

/* ---------- Normale Seiten ---------- */
.mm-breite, .mm-seite { max-width: 1100px; margin: 0 auto; padding: 0 var(--mm-rand); }
.mm-seite { padding-top: var(--mm-rand); }
.mm-seite .wp-block-columns { gap: 18px; margin: 0; }
.mm-seite .wp-block-column > h1:first-child { margin-top: 17px; }
.mm-seite .wp-block-spacer { margin: 0; }

/* Video */
.mm-video { position: relative; aspect-ratio: 1 / .562; background: #111; margin: 0 0 34px; overflow: hidden; }
.mm-video button {
  all: unset; cursor: pointer; position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
}
.mm-video img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.mm-video .mm-play {
  position: relative; width: 74px; height: 74px; border-radius: 50%;
  background: rgba(0, 0, 0, .55); transition: background .2s;
}
.mm-video .mm-play::after {
  content: ""; position: absolute; left: 29px; top: 23px;
  border-style: solid; border-width: 14px 0 14px 22px; border-color: transparent transparent transparent #fff;
}
.mm-video button:hover .mm-play { background: rgba(0, 0, 0, .8); }
.mm-video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.mm-hinweis { font-size: 12px; line-height: 1.5; color: var(--mm-grau); letter-spacing: .04em; }
.mm-video .mm-hinweis { position: absolute; left: 0; right: 0; bottom: 10px; text-align: center; color: #ddd; }

/* Karte */
.mm-karte { position: relative; aspect-ratio: 1.6; background: #e4e4e4; margin-right: -18px; }
.mm-karte button {
  all: unset; cursor: pointer; position: absolute; inset: 0; display: flex; flex-direction: column;
  align-items: center; justify-content: center; text-align: center; padding: 20px; gap: 6px;
}
.mm-karte button span:first-child { font-size: 15px; letter-spacing: .1em; text-transform: uppercase; color: var(--mm-text); }
.mm-karte iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; filter: grayscale(1); }

/* Kontaktformular */
.mm-kontakt { margin-top: 80px; }
.mm-kontakt fieldset { border: 0; padding: 0; margin: 0 0 18px; }
.mm-kontakt legend, .mm-kontakt label { display: block; font-size: 16px; line-height: 23px; padding: 0; }
.mm-kontakt .mm-reihe { display: grid; grid-template-columns: 1fr 1fr; gap: 0 10px; }
.mm-kontakt .mm-pflicht { font-size: 11px; color: var(--mm-grau); letter-spacing: .04em; }
.mm-kontakt .mm-unter { font-size: 12px; line-height: 14px; margin-bottom: 1px; }
.mm-kontakt .mm-feld { margin-bottom: 17px; }
.mm-kontakt input[type=text], .mm-kontakt input[type=email], .mm-kontakt textarea {
  width: 100%; font: inherit; font-size: 16px; line-height: 23px; letter-spacing: .04em;
  padding: 8px 12px; border: 1px solid #a9a9a9; background: #fafafa; border-radius: 0; color: var(--mm-text);
}
.mm-kontakt textarea { height: 100px; resize: vertical; }
.mm-kontakt input:focus, .mm-kontakt textarea:focus { outline: none; border-color: #888; background: #fff; }
.mm-kontakt button {
  font: inherit; font-size: 16px; line-height: 19px; letter-spacing: .2em; text-transform: uppercase;
  background: #272727; color: #fff; border: 0; padding: 16px 40px; min-width: 193px; cursor: pointer; margin-top: 1px;
}
.mm-kontakt button:hover { background: #000; }
.mm-kontakt .mm-falle { position: absolute; left: -9999px; }
.mm-meldung { padding: 14px 18px; margin: 0 0 24px; background: #f2f2f2; }
.mm-meldung.mm-fehler { background: #fbeaea; }

/* ---------- Fuß ---------- */
.mm-fuss { max-width: 1100px; margin: 0 auto; padding: var(--mm-rand) var(--mm-rand); font-size: 16px; line-height: 32px; color: var(--mm-grau); }
.mm-fuss ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; }
.mm-fuss li + li::before { content: " - "; white-space: pre; }
.mm-fuss a { color: var(--mm-grau); transition: color .2s; }
.mm-fuss a:hover { color: var(--mm-text); }

/* ---------- Handy ---------- */
@media (max-width: 640px) {
  :root { --mm-rand: 15px; }
  .mm-kopf { position: sticky; top: 0; height: 63px; background: #fff; padding: 15px; align-items: center; }
  .mm-logo img { height: 33px; }
  .mm-menue-knopf {
    display: block; position: relative; z-index: 2; width: 24px; height: 24px; margin-right: 3px;
    background: none; border: 0; padding: 0; cursor: pointer; color: #000;
  }
  .mm-menue-knopf span { position: absolute; left: 0; width: 24px; height: 2px; background: currentColor; transition: transform .25s, opacity .2s; }
  .mm-menue-knopf span:nth-child(1) { top: 4px; }
  .mm-menue-knopf span:nth-child(2) { top: 11px; }
  .mm-menue-knopf span:nth-child(3) { top: 18px; }
  .mm-menue-offen .mm-menue-knopf span:nth-child(1) { transform: translateY(7px) rotate(45deg); width: 22px; }
  .mm-menue-offen .mm-menue-knopf span:nth-child(2) { opacity: 0; }
  .mm-menue-offen .mm-menue-knopf span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); width: 22px; }
  .mm-nav {
    position: fixed; inset: 0; z-index: 1; background: #fff; margin: 0;
    display: flex; align-items: center; justify-content: center;
    opacity: 0; visibility: hidden; transition: opacity .25s, visibility .25s;
  }
  .mm-menue-offen { overflow: hidden; }
  .mm-menue-offen .mm-nav { opacity: 1; visibility: visible; }
  .mm-nav ul { flex-direction: column; gap: 0; text-align: center; }
  .mm-nav a, .mm-nav .current-menu-item > a { font-size: 22px; line-height: 39.6px; color: #000; }
  .mm-logo { position: relative; z-index: 2; }
  .mm-streifen { margin-top: 0; }
  .mm-streifen a { height: 268px; }
  .mm-streifen .mm-streifen-titel { display: none; }
  .mm-projekt-titel { max-width: none; padding: 45px var(--mm-rand) 70px; }
  .mm-projekt .wp-block-image.mm-hoch { width: 100%; margin-top: 0; }
  .mm-projekt .wp-block-image.mm-hoch + .wp-block-image:not(.mm-hoch) { margin-top: 0; }
  .mm-seite { padding-top: 30px; }
  .mm-seite .wp-block-columns { flex-direction: column; gap: 30px; }
  .mm-karte { margin-right: 0; }
  .mm-kontakt .mm-reihe { grid-template-columns: 1fr; }
  h1 { font-size: 22px; }
  h2 { font-size: 18px; }
}
