/* Die Schrauberstube - Werkstattpapier, Blaumann, Messing */

/* ---------- Schriften (liegen im Projekt, nicht auf fremden Servern) ---------- */
@font-face {
  font-family: "Bricolage Grotesque";
  src: url("/static/fonts/bricolage-grotesque-v9-latin-700.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Bricolage Grotesque";
  src: url("/static/fonts/bricolage-grotesque-v9-latin-800.woff2") format("woff2");
  font-weight: 800;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Karla";
  src: url("/static/fonts/karla-v33-latin-regular.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Karla";
  src: url("/static/fonts/karla-v33-latin-500.woff2") format("woff2");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Karla";
  src: url("/static/fonts/karla-v33-latin-700.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

/* ---------- Grundwerte ---------- */
:root {
  --papier: #e7e1d3;
  --papier-hell: #f4efe4;
  --tinte: #23303a;
  --blaumann: #2f5468;
  --messing: #a97b2b;
  --rost: #96412a;
  --stahl: #6b7078;
  --linie: rgba(35, 48, 58, 0.16);
  --linie-fein: rgba(47, 84, 104, 0.13);

  --display: "Bricolage Grotesque", "Trebuchet MS", "Segoe UI", sans-serif;
  --body: "Karla", -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;

  --breite: min(72rem, 92vw);
  --radius: 3px;
}

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100dvh;
  font-family: var(--body);
  font-size: clamp(1rem, 0.96rem + 0.24vw, 1.125rem);
  line-height: 1.65;
  color: var(--tinte);
  background-color: var(--papier);
  /* Karopapier: das Blatt, auf dem in der Werkstatt notiert wird */
  background-image:
    linear-gradient(var(--linie-fein) 1px, transparent 1px),
    linear-gradient(90deg, var(--linie-fein) 1px, transparent 1px);
  background-size: 26px 26px;
  text-wrap: pretty;
}

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

a {
  color: var(--blaumann);
  text-underline-offset: 0.2em;
  text-decoration-thickness: 1px;
}

:focus-visible {
  outline: 3px solid var(--rost);
  outline-offset: 3px;
  border-radius: 2px;
}

.huelle {
  width: var(--breite);
  margin-inline: auto;
}

/* Sprungziele bleiben unter der Kopfzeile sichtbar */
[id] {
  scroll-margin-top: 6rem;
}

.nur-fuer-screenreader {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

/* ---------- Typografie ---------- */
h1,
h2,
h3 {
  font-family: var(--display);
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -0.015em;
  margin: 0;
  text-wrap: balance;
}

.augenbraue {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--blaumann);
  margin: 0;
}

/* ---------- Kopfzeile ---------- */
.kopf {
  border-bottom: 1px solid var(--linie);
  background: rgba(231, 225, 211, 0.92);
  backdrop-filter: blur(6px);
  position: sticky;
  top: 0;
  z-index: 20;
}

.kopf .huelle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 4.25rem;
  flex-wrap: wrap;
}

.wortmarke {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  font-family: var(--display);
  font-weight: 800;
  font-size: 1.16rem;
  letter-spacing: -0.02em;
  color: var(--tinte);
  text-decoration: none;
  padding: 0.5rem 0;
}

.wortmarke:hover {
  color: var(--blaumann);
}

.wortmarke svg {
  flex: none;
  color: var(--messing);
}

.kopf-menue {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.95rem;
}

.kopf-menue a {
  color: var(--tinte);
  text-decoration: none;
  padding: 0.7rem 0.8rem;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  border-radius: var(--radius);
}

.kopf-menue a:hover {
  background: rgba(47, 84, 104, 0.1);
  color: var(--blaumann);
}

/* Auf dem Handy bleibt die Kopfzeile eine Zeile hoch */
@media (max-width: 46rem) {
  .kopf .huelle {
    flex-wrap: nowrap;
    min-height: 3.7rem;
  }
  .wortmarke {
    font-size: 1.05rem;
  }
  .kopf-menue {
    font-size: 0.9rem;
  }
  .wortmarke {
    white-space: nowrap;
  }
  /* Auf dem Handy nur die Abkuerzung zum Schreiben; zu den Anleitungen
     fuehrt gleich darunter der grosse Knopf. */
  .kopf-menue a[href$="so-geht-das"],
  .kopf-menue a[href$="anleitungen"] {
    display: none;
  }
  .kopf-menue a {
    padding-inline: 0.5rem;
  }
}

/* ---------- Buehne ---------- */
.buehne {
  padding: clamp(2.5rem, 6vw, 5.5rem) 0 clamp(2rem, 4vw, 3.5rem);
}

.buehne-raster {
  display: grid;
  gap: clamp(2.5rem, 5vw, 4rem);
  align-items: center;
}

@media (min-width: 62rem) {
  .buehne-raster {
    grid-template-columns: 1.15fr 0.85fr;
  }
}

.buehne h1 {
  font-size: clamp(2.6rem, 1.7rem + 3.8vw, 4.5rem);
  margin: 0.7rem 0 0;
}

.buehne h1 .zeile-zwei {
  display: block;
  color: var(--blaumann);
}

.vorspann {
  font-size: clamp(1.06rem, 1rem + 0.4vw, 1.3rem);
  max-width: 34ch;
  margin: 1.3rem 0 0;
  color: #33424e;
}

.buehne-knoepfe {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
  margin-top: 2rem;
}

.knopf {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 48px;
  padding: 0.75rem 1.5rem;
  font-family: var(--body);
  font-weight: 700;
  font-size: 1rem;
  border-radius: var(--radius);
  text-decoration: none;
  border: 1.5px solid var(--tinte);
  background: var(--tinte);
  color: var(--papier-hell);
  box-shadow: 3px 3px 0 rgba(35, 48, 58, 0.22);
  transition: transform 0.14s ease, box-shadow 0.14s ease;
}

.knopf:hover {
  transform: translate(-1px, -1px);
  box-shadow: 5px 5px 0 rgba(35, 48, 58, 0.24);
}

.knopf:active {
  transform: translate(2px, 2px);
  box-shadow: 1px 1px 0 rgba(35, 48, 58, 0.22);
}

.knopf-leise {
  background: transparent;
  color: var(--tinte);
  box-shadow: none;
  border-color: var(--linie);
}

.knopf-leise:hover {
  border-color: var(--tinte);
  box-shadow: 3px 3px 0 rgba(35, 48, 58, 0.16);
}

/* ---------- Der Werkstattzettel ---------- */
.zettel {
  position: relative;
  background: var(--papier-hell);
  border: 1px solid var(--linie);
  border-radius: 4px;
  padding: 2.9rem 1.7rem 1.7rem;
  max-width: 26rem;
  margin-inline: auto;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.7) inset, 8px 10px 26px rgba(35, 48, 58, 0.14);
  transform: rotate(-1.4deg);
}

.zettel::before {
  /* Loch zum Anhaengen */
  content: "";
  position: absolute;
  top: 0.95rem;
  left: 50%;
  transform: translateX(-50%);
  width: 15px;
  height: 15px;
  border-radius: 50%;
  background: var(--papier);
  box-shadow: 0 1px 2px rgba(35, 48, 58, 0.4) inset;
}

.zettel-kopf {
  font-family: var(--display);
  font-weight: 700;
  font-size: 0.74rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--stahl);
  text-align: center;
  padding-bottom: 0.9rem;
  border-bottom: 1px dashed var(--linie);
}

.zettel dl {
  margin: 0;
  display: grid;
  grid-template-columns: minmax(6.5rem, auto) 1fr;
  gap: 0.15rem 1rem;
  padding: 1.1rem 0 0.4rem;
  font-size: 0.98rem;
}

.zettel dt {
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  color: var(--stahl);
  padding-top: 0.42rem;
}

.zettel dd {
  margin: 0;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--linie-fein);
  font-weight: 500;
}

.stempel {
  display: block;
  width: fit-content;
  margin: 1.6rem auto 0.2rem;
  font-family: var(--display);
  font-weight: 800;
  font-size: clamp(1.5rem, 1.1rem + 1.5vw, 2.1rem);
  letter-spacing: 0.06em;
  color: var(--rost);
  border: 3px solid var(--rost);
  border-radius: 6px;
  padding: 0.3rem 0.9rem 0.35rem;
  transform: rotate(-7deg);
  opacity: 0.82;
}

/* ---------- Kontakt ---------- */
.kontakt {
  border-top: 1px solid var(--linie);
  border-bottom: 1px solid var(--linie);
  background: rgba(244, 239, 228, 0.55);
}

.kontakt-raster {
  display: grid;
  gap: clamp(1.8rem, 4vw, 3.5rem);
  align-items: start;
}

@media (min-width: 58rem) {
  .kontakt-raster {
    grid-template-columns: 0.9fr 1.1fr;
  }
}

.kontakt-text h2 {
  font-size: clamp(1.6rem, 1.3rem + 1.3vw, 2.2rem);
  margin: 0.4rem 0 0.9rem;
}

.kontakt-text p {
  margin: 0;
  color: #414f5a;
  max-width: 34ch;
}

.kontakt-karte {
  background: var(--papier-hell);
  border: 1px solid var(--linie);
  border-radius: 4px;
  padding: clamp(1.3rem, 3vw, 1.9rem);
  box-shadow: 5px 6px 0 rgba(35, 48, 58, 0.09);
}

.kontakt-formular {
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
}

.feld-name {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--stahl);
}

.kontakt-formular textarea {
  width: 100%;
  font-family: var(--body);
  font-size: 1.02rem;
  line-height: 1.6;
  color: var(--tinte);
  background: #fbf8f1;
  border: 1.5px solid var(--linie);
  border-radius: 3px;
  padding: 0.85rem 0.95rem;
  resize: vertical;
  min-height: 9rem;
}

.kontakt-formular textarea::placeholder {
  color: #9aa0a6;
}

.kontakt-formular textarea:focus-visible {
  border-color: var(--blaumann);
}

.kontakt-formular .knopf {
  align-self: flex-start;
}

/* Falle fuer Maschinen: fuer Menschen unsichtbar, aber nicht display:none */
.werkbank-feld {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.kontakt-direkt {
  margin: 1.4rem 0 0;
  padding-top: 1.1rem;
  border-top: 1px dashed var(--linie);
  font-size: 0.95rem;
  color: var(--stahl);
}

.kontakt-direkt a {
  font-weight: 700;
  color: var(--blaumann);
  word-break: break-word;
}

.meldung {
  padding: 1.1rem 1.3rem;
  border-radius: 4px;
  border-left: 4px solid var(--blaumann);
  background: rgba(47, 84, 104, 0.09);
}

.meldung strong {
  display: block;
  font-family: var(--display);
  font-weight: 700;
  font-size: 1.15rem;
  margin-bottom: 0.25rem;
}

.meldung p {
  margin: 0;
}

.meldung-schlecht {
  border-left-color: var(--rost);
  background: rgba(150, 65, 42, 0.09);
  margin-bottom: 1.2rem;
}

/* ---------- Abschnitte ---------- */
.abschnitt {
  padding: clamp(2.5rem, 5vw, 4.5rem) 0;
}

.abschnitt-kopf {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
  padding-bottom: 1.4rem;
  border-bottom: 2px solid var(--tinte);
  margin-bottom: 2.2rem;
}

.abschnitt-kopf h2 {
  font-size: clamp(1.7rem, 1.3rem + 1.5vw, 2.5rem);
  margin-top: 0.35rem;
}

.abschnitt-kopf p {
  margin: 0;
  color: var(--stahl);
  font-size: 0.97rem;
  max-width: 34ch;
}

/* ---------- Kacheln ---------- */
.kacheln {
  display: grid;
  gap: 1.6rem;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 18.5rem), 1fr));
}

.kachel {
  position: relative;
  display: flex;
  flex-direction: column;
  background: var(--papier-hell);
  border: 1px solid var(--linie);
  border-radius: 4px;
  padding: 1.5rem 1.5rem 1.35rem;
  text-decoration: none;
  color: inherit;
  box-shadow: 4px 5px 0 rgba(35, 48, 58, 0.09);
  transition: transform 0.16s ease, box-shadow 0.16s ease, border-color 0.16s ease;
}

.kachel:nth-child(even) {
  transform: rotate(0.35deg);
}

.kachel:nth-child(odd) {
  transform: rotate(-0.3deg);
}

.kachel:hover {
  transform: rotate(0deg) translate(-2px, -3px);
  box-shadow: 7px 9px 0 rgba(47, 84, 104, 0.16);
  border-color: var(--blaumann);
}

.kachel-fach {
  align-self: flex-start;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--papier-hell);
  background: var(--blaumann);
  padding: 0.28rem 0.6rem;
  border-radius: 2px;
}

.kachel h3 {
  font-size: 1.42rem;
  margin: 1rem 0 0.55rem;
}

.kachel p {
  margin: 0 0 1.5rem;
  color: #414f5a;
  font-size: 0.99rem;
}

.kachel-fuss {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-top: auto;
  padding-top: 0.9rem;
  border-top: 1px dashed var(--linie);
  font-size: 0.84rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--stahl);
}

.kachel:hover .kachel-fuss {
  color: var(--blaumann);
}

.pfeil {
  font-family: var(--display);
  font-size: 1.15rem;
  color: var(--messing);
  transition: transform 0.16s ease;
}

.kachel:hover .pfeil {
  transform: translateX(4px);
}

/* ---------- So laeuft das hier ---------- */
.werkbank {
  border-top: 1px solid var(--linie);
  border-bottom: 1px solid var(--linie);
  background: rgba(244, 239, 228, 0.55);
}

.dreisatz {
  display: grid;
  gap: 2rem;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 16rem), 1fr));
}

.dreisatz div {
  padding-top: 1.1rem;
  border-top: 3px solid var(--messing);
}

.dreisatz h3 {
  font-size: 1.2rem;
  margin-bottom: 0.5rem;
}

.dreisatz p {
  margin: 0;
  color: #414f5a;
  font-size: 0.97rem;
}

/* ---------- Anleitungsseite ---------- */
.zurueck {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  min-height: 44px;
  font-size: 0.9rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--stahl);
  text-decoration: none;
}

.zurueck:hover {
  color: var(--blaumann);
}

.anleitung-kopf {
  padding: 1.5rem 0 clamp(2rem, 4vw, 3rem);
  max-width: 46rem;
}

.anleitung-kopf h1 {
  font-size: clamp(2.1rem, 1.5rem + 2.6vw, 3.6rem);
  margin: 0.9rem 0 0;
}

.anleitung-kopf .vorspann {
  max-width: 52ch;
}

.werkzeugliste {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 1.7rem 0 0;
  padding: 0;
  list-style: none;
}

.werkzeugliste li {
  font-size: 0.85rem;
  font-weight: 500;
  padding: 0.35rem 0.75rem;
  border: 1px solid var(--linie);
  border-radius: 999px;
  background: var(--papier-hell);
}

.schritte {
  list-style: none;
  counter-reset: schritt;
  margin: 0;
  padding: 0 0 clamp(2rem, 4vw, 3rem);
  max-width: 46rem;
}

.schritt {
  counter-increment: schritt;
  position: relative;
  padding: 0 0 2.1rem 4.2rem;
}

.schritt::before {
  content: counter(schritt, decimal-leading-zero);
  position: absolute;
  left: 0;
  top: -0.35rem;
  font-family: var(--display);
  font-weight: 800;
  font-size: 1.55rem;
  color: var(--messing);
  font-variant-numeric: tabular-nums;
}

.schritt::after {
  content: "";
  position: absolute;
  left: 1.1rem;
  top: 2.1rem;
  bottom: 0.2rem;
  width: 2px;
  background: repeating-linear-gradient(
    to bottom,
    var(--linie) 0 5px,
    transparent 5px 11px
  );
}

.schritt:last-child {
  padding-bottom: 0.5rem;
}

.schritt:last-child::after {
  display: none;
}

.schritt p {
  margin: 0;
  font-size: 1.06rem;
}

.fotoplatz {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  margin-top: 1rem;
  padding: 2.1rem 1rem;
  border: 2px dashed var(--linie);
  border-radius: 4px;
  background: rgba(244, 239, 228, 0.6);
  color: var(--stahl);
  font-size: 0.88rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-align: center;
}

.hinweis {
  max-width: 46rem;
  margin: 0 0 clamp(2rem, 4vw, 3rem);
  padding: 1.2rem 1.4rem;
  border-left: 4px solid var(--rost);
  background: rgba(150, 65, 42, 0.07);
  border-radius: 0 4px 4px 0;
}

.hinweis strong {
  display: block;
  font-family: var(--display);
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--rost);
  margin-bottom: 0.2rem;
}

.hinweis p {
  margin: 0;
  font-size: 0.99rem;
}

.weiter {
  border-top: 2px solid var(--tinte);
  padding-top: 1.6rem;
  margin-bottom: clamp(2.5rem, 5vw, 4rem);
}

.weiter h2 {
  font-size: 1.35rem;
  margin-bottom: 1.4rem;
}

/* ---------- Fuss ---------- */
.fuss {
  border-top: 1px solid var(--linie);
  padding: 2.4rem 0 3rem;
  font-size: 0.92rem;
  color: var(--stahl);
}

.fuss .huelle {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.8rem;
}

.fuss p {
  margin: 0;
}

/* ---------- Ruhe fuer alle, die sie brauchen ---------- */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
