/* ==========================================================================
   tools.matthiasmeyer.ch – gemeinsames Layout im Stil von www.matthiasmeyer.ch
   Kann später nach /_shared/ verschoben und von allen Tools eingebunden werden.
   ========================================================================== */

/* Schriften liegen auf dem eigenen Server (SIL Open Font License) – keine Anfragen an Google. */
@font-face {
  font-family: "Montserrat";
  src: url("../fonts/montserrat-latin.woff2") format("woff2");
  font-weight: 100 900; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Raleway";
  src: url("../fonts/raleway-latin.woff2") format("woff2");
  font-weight: 100 900; font-style: normal; font-display: swap;
}

:root {
  --mm-red: #871A5D;        /* Hausfarbe Rot */
  --mm-red-deep: #5E1241;
  --mm-red-tint: #F6EAF1;
  --mm-red-line: #E3BDD2;   /* feine Rahmen wie bei den Blog-Karten */
  --mm-blue: #B9C7E4;       /* Hausfarbe Blau */
  --mm-blue-pale: #EEF2FA;
  --mm-ink: #2E2A33;
  --mm-muted: #66606B;
  --mm-line: #DDD9E2;
  --mm-paper: #FFFFFF;

  --mm-font-head: "Montserrat", "Gill Sans", "Gill Sans MT", system-ui, sans-serif;
  --mm-font: "Raleway", "Gill Sans", "Gill Sans MT", system-ui, sans-serif;

  --mm-max: 74rem;
  --mm-radius: 4px;
}

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

body {
  margin: 0;
  font-family: var(--mm-font);
  font-size: 1.0625rem;
  line-height: 1.6;
  color: var(--mm-ink);
  background: var(--mm-paper);
  -webkit-text-size-adjust: 100%;
  font-variant-numeric: lining-nums;
}

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

a { color: var(--mm-red); text-underline-offset: .15em; }
a:hover { color: var(--mm-red-deep); }

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

/* Titel wie auf matthiasmeyer.ch: rot, Grossbuchstaben, leicht gesperrt */
h1, h2, h3 {
  font-family: var(--mm-font-head);
  font-weight: 600;
  color: var(--mm-red);
  line-height: 1.2;
  text-transform: uppercase;
  letter-spacing: .045em;
}
h1 { font-size: clamp(1.45rem, 2.6vw, 2rem); margin: .4em 0 .5em; }
h2 { font-size: 1.15rem; margin: 2em 0 .6em; }
h3 { font-size: 1rem; margin: 1.6em 0 .5em; }

.mm-skip { position: absolute; left: -999px; top: .5rem; z-index: 100; padding: .5rem 1rem; background: #fff; }
.mm-skip:focus { left: .5rem; }

.mm-visually-hidden {
  position: absolute !important; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}

/* ---------- Kopf ---------- */

.mm-top {
  max-width: var(--mm-max); margin: 0 auto; padding: .9rem 1.25rem;
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
}
.mm-owner {
  font-family: var(--mm-font-head); font-weight: 600; letter-spacing: .01em;
  font-size: clamp(1.15rem, 2.3vw, 1.65rem); color: var(--mm-red); text-decoration: none;
}
.mm-logo img { height: clamp(26px, 3.6vw, 40px); width: auto; }

.mm-band { background: var(--mm-blue); }
.mm-nav {
  max-width: var(--mm-max); margin: 0 auto; padding: 1rem 1.25rem .35rem;
  display: flex; flex-wrap: wrap; align-items: center; gap: .5rem 1rem;
}
.mm-nav ul { display: flex; flex-wrap: wrap; gap: .4rem 1.6rem; margin: 0; padding: 0; list-style: none; }
.mm-nav a, .mm-nav-logout button {
  font-family: var(--mm-font-head); font-size: .8rem; font-weight: 600;
  text-transform: uppercase; letter-spacing: .07em;
  color: var(--mm-ink); text-decoration: none; padding: .2rem 0;
  border-bottom: 2px solid transparent;
}
.mm-nav a:hover { color: var(--mm-red); }
.mm-nav a[aria-current="page"] { color: var(--mm-red); border-bottom-color: var(--mm-red); }
.mm-nav-logout { margin-left: auto; }
.mm-nav-logout button { background: none; border-top: 0; border-left: 0; border-right: 0; cursor: pointer; }
.mm-nav-logout button:hover { color: var(--mm-red); }

/* Geschwungene Unterkante des Bandes */
.mm-wave { display: block; width: 100%; height: clamp(26px, 4.5vw, 64px); }
.mm-wave path { fill: var(--mm-blue); }

/* ---------- Inhalt ---------- */

.mm-main { max-width: var(--mm-max); margin: 0 auto; padding: .5rem 1.25rem 4rem; }

.mm-muted { color: var(--mm-muted); }
.mm-small { font-size: .88rem; }
.mm-subtle { color: var(--mm-muted); font-weight: 400; font-size: .62em; letter-spacing: .02em; }
.mm-narrow { max-width: 30rem; }

.mm-note {
  margin: 0 0 1.25rem; padding: .7rem 1rem; font-size: .95rem;
  background: var(--mm-blue-pale); border-left: 4px solid var(--mm-red);
}

.mm-prose { max-width: 42em; }
.mm-prose p, .mm-prose ul { margin: 0 0 1em; }
.mm-prose ul { padding-left: 1.2em; }

.mm-legal-page { max-width: 46rem; }

/* ---------- Fuss: schmal, mit Signet ---------- */

.mm-footer { background: var(--mm-blue); }
.mm-footer-inner {
  max-width: var(--mm-max); margin: 0 auto; padding: .55rem 1.25rem;
  display: flex; flex-wrap: wrap; align-items: center; gap: .5rem 1.25rem;
}
.mm-footer-signet img { width: 34px; height: 34px; }
.mm-copy { margin: 0; font-size: .82rem; color: var(--mm-ink); }
.mm-legal { margin-left: auto; display: flex; gap: 1.5rem; }
.mm-legal a {
  font-family: var(--mm-font-head); font-size: .72rem; font-weight: 600;
  text-transform: uppercase; letter-spacing: .08em; color: var(--mm-ink); text-decoration: none;
}
.mm-legal a:hover { color: var(--mm-red); text-decoration: underline; }

/* ---------- Buttons wie «Mehr erfahren» ---------- */

.mm-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  padding: .7rem 1.2rem; border: 1px solid var(--mm-red); border-radius: var(--mm-radius);
  background: #fff; color: var(--mm-red);
  font-family: var(--mm-font-head); font-size: .78rem; font-weight: 600; line-height: 1.2;
  text-transform: uppercase; letter-spacing: .08em;
  text-decoration: none; cursor: pointer; transition: background-color .15s, color .15s;
}
.mm-btn:hover { background: var(--mm-red); color: #fff; }
.mm-btn--solid { background: var(--mm-red); color: #fff; }
.mm-btn--solid:hover { background: var(--mm-red-deep); border-color: var(--mm-red-deep); }
.mm-btn--small { padding: .45rem .8rem; font-size: .7rem; }
.mm-btn--large { padding: .95rem 1.6rem; font-size: .88rem; }

.mm-linkbtn { border: 0; background: none; padding: 0; font: inherit; color: var(--mm-red); text-decoration: underline; cursor: pointer; }

/* ---------- Meldungen ---------- */

.mm-flash { padding: .75rem 1rem; margin: 0 0 1.25rem; }
.mm-flash--ok { background: #E7F3EA; color: #1F5A2E; }
.mm-flash--error { background: var(--mm-red-tint); color: var(--mm-red-deep); border-left: 4px solid var(--mm-red); }

/* ---------- Formulare ---------- */

.mm-form { max-width: 30rem; }
.mm-form--wide { max-width: 46rem; }
.mm-field { margin: 0 0 1.25rem; }
.mm-field--short { max-width: 12rem; }
.mm-field label { display: block; font-weight: 700; margin-bottom: .35rem; }

.mm-field input[type="text"], .mm-field input[type="password"], .mm-field input[type="number"],
.mm-field input[type="url"], .mm-field textarea, .mm-field select {
  width: 100%; padding: .6rem .75rem; font: inherit; color: var(--mm-ink);
  background: #fff; border: 1px solid #BDB4C3; border-radius: var(--mm-radius);
}
.mm-field textarea { resize: vertical; line-height: 1.5; }
.mm-field input:focus, .mm-field textarea:focus { outline: none; border-color: var(--mm-red); box-shadow: 0 0 0 3px rgba(135, 26, 93, .18); }
.mm-field input[type="file"] { font: inherit; font-size: .95rem; }

.mm-hint { margin: .35rem 0 0; font-size: .88rem; color: var(--mm-muted); font-weight: 400; }
.mm-optional { font-weight: 400; color: var(--mm-muted); }

.mm-fieldset { border: 1px solid var(--mm-red-line); border-radius: var(--mm-radius); padding: 1rem 1.25rem .25rem; margin: 0 0 1.5rem; }
.mm-fieldset legend {
  padding: 0 .4rem; font-family: var(--mm-font-head); font-weight: 600; font-size: .85rem;
  text-transform: uppercase; letter-spacing: .06em; color: var(--mm-red);
}

.mm-check { display: inline-flex; align-items: flex-start; gap: .5rem; cursor: pointer; }
.mm-check input { margin-top: .35rem; accent-color: var(--mm-red); width: 1.05rem; height: 1.05rem; }
.mm-check--publish { display: flex; padding: 1rem 1.25rem; background: var(--mm-blue-pale); font-weight: 700; margin-bottom: 1.5rem; }
.mm-check--publish .mm-hint { display: block; }
.mm-radios { display: flex; flex-wrap: wrap; gap: .5rem 1.75rem; margin-bottom: 1.1rem; }

.mm-current-image { display: flex; align-items: center; gap: 1.25rem; flex-wrap: wrap; margin-bottom: 1rem; }
.mm-current-image img { width: 9rem; aspect-ratio: 4 / 3; object-fit: cover; border-radius: var(--mm-radius); }
.mm-current-image--wide img { width: 14rem; }

.mm-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem 1.25rem; margin-top: .5rem; }

/* ---------- Verwaltung ---------- */

.mm-tabs { display: flex; gap: 1.5rem; margin: 0 0 1.5rem; border-bottom: 1px solid var(--mm-line); }
.mm-tabs a {
  padding: .5rem 0; margin-bottom: -1px; text-decoration: none; color: var(--mm-muted);
  font-family: var(--mm-font-head); font-size: .8rem; font-weight: 600; text-transform: uppercase; letter-spacing: .06em;
  border-bottom: 2px solid transparent;
}
.mm-tabs a[aria-current="page"] { color: var(--mm-red); border-bottom-color: var(--mm-red); }

.mm-table-wrap { overflow-x: auto; }
.mm-table { width: 100%; border-collapse: collapse; }
.mm-table th {
  text-align: left; font-family: var(--mm-font-head); font-size: .72rem; font-weight: 600;
  text-transform: uppercase; letter-spacing: .07em; color: var(--mm-muted);
  padding: .5rem .75rem; border-bottom: 2px solid var(--mm-line);
}
.mm-table td { padding: .5rem .75rem; border-bottom: 1px solid var(--mm-line); vertical-align: middle; }
.mm-table tbody tr:hover { background: #FBF8FC; }
.mm-daycell { font-family: var(--mm-font-head); font-weight: 700; color: var(--mm-red); font-size: 1.1rem; width: 3.5rem; }
.mm-right { text-align: right; }

.mm-thumb { display: block; width: 4.5rem; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 3px; }
.mm-thumb--empty { background: repeating-linear-gradient(135deg, var(--mm-blue-pale) 0 6px, #fff 6px 12px); border: 1px dashed var(--mm-blue); }

.mm-chip { display: inline-block; padding: .15rem .6rem; border-radius: 999px; font-size: .82rem; font-weight: 700; white-space: nowrap; }
.mm-chip--online { background: var(--mm-red); color: #fff; }
.mm-chip--planned { background: var(--mm-blue); color: var(--mm-ink); }
.mm-chip--draft { background: var(--mm-red-tint); color: var(--mm-red-deep); }
.mm-chip--empty { background: #F1EEF3; color: var(--mm-muted); }

@media (max-width: 560px) {
  .mm-legal { margin-left: 0; width: 100%; }
  .mm-owner { font-size: 1.05rem; }
  .mm-logo img { height: 24px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
