/* Entwurf 3 «Arbeiten in Holz». Die Fotos tragen die Farbe; drumherum Papierweiß und Kohle, dazu das Blau der
   Schlagschnur für alles, was man antippt. Schrift mit Füßen, kräftig wie ein Balken.
   Werte und Begründungen: DESIGN.md. */

@font-face {
  font-family: Zilla;
  src: url("/fonts/zilla-de-400.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: Zilla;
  src: url("/fonts/zilla-de-700.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

/* Ersatzschrift je Schnitt mit angeglichenen Maßen: Der Wechsel zur geladenen Schrift verschiebt keine Zeile. */
@font-face {
  font-family: "Zilla Ersatz";
  src: local("Georgia");
  font-weight: 400;
  size-adjust: 97.7%;
  ascent-override: 94.4%;
  descent-override: 25.6%;
  line-gap-override: 0%;
}

@font-face {
  font-family: "Zilla Ersatz";
  src: local("Georgia Bold"), local("Georgia-Bold");
  font-weight: 700;
  size-adjust: 85.5%;
  ascent-override: 94.4%;
  descent-override: 25.6%;
  line-gap-override: 0%;
}

:root {
  --kreide: #1b4fc4;
  --kohle: #211812;
  --papier: #fbf8f3;
  --span: #efe8dc;
  --grund: #fbf8f3;
  --schrift: #211812;
  --leise: #5c5048;
  --linie: #d8cebf;
  --griff: #211812;
  --griff-schrift: #ffffff;
  --knopf: #1b4fc4;
  --knopf-schrift: #ffffff;
  --rand: clamp(1rem, 4vw, 3rem);
}

@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }
}

body {
  font-family: Zilla, "Zilla Ersatz", Georgia, serif;
  font-size: 1.1875rem;
  line-height: 1.45;
  font-variant-numeric: lining-nums;
  hyphens: auto;
  overflow-wrap: break-word;
}

h1,
h2,
h3,
p,
ul,
dl {
  margin: 0;
}

.innen {
  max-width: 76rem;
  margin: 0 auto;
  padding: 0 var(--rand);
}

/* ---- Kopf: Name links, Nummer und Schaltflächen rechts ---- */

.kopf {
  padding: 1rem 0 0.875rem;
}

.kopf-zeile {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 0.75rem;
}

.kopf h1 {
  font-size: clamp(2.75rem, 7vw, 6rem);
  line-height: 0.95;
  font-weight: 700;
  letter-spacing: -0.025em;
  hyphens: manual;
}

.kopf-wer {
  margin-top: 0.375rem;
  font-size: clamp(1.0625rem, 1.5vw, 1.3125rem);
  line-height: 1.3;
  hyphens: manual;
}

.kopf-wer span {
  display: inline-block;
  color: var(--kreide);
  font-weight: 700;
}

.kopf-ruf {
  display: grid;
  gap: 0.5rem;
}

.nummer {
  display: inline-flex;
  align-items: center;
  justify-self: start;
  min-height: 2.75rem;
  font-size: clamp(2.25rem, 4vw, 3.5rem);
  line-height: 1;
  font-weight: 700;
  letter-spacing: -0.01em;
  white-space: nowrap;
  text-decoration: none;
}

.knoepfe {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.knopf {
  display: inline-flex;
  flex: 1 1 auto;
  align-items: center;
  justify-content: center;
  min-height: 3.25rem;
  padding: 0.5rem 1.375rem;
  border: 2px solid var(--kreide);
  border-radius: 0.625rem;
  background: var(--kreide);
  color: #fff;
  font-size: 1.1875rem;
  font-weight: 700;
  text-decoration: none;
  transition: translate 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease, color 0.15s ease;
}

.knopf-leise {
  background: transparent;
  color: var(--kreide);
}

/* ---- Raster der Arbeiten ---- */

.raster {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.5rem;
  padding: 0;
  list-style: none;
}

.raster li {
  aspect-ratio: 1;
}

.raster .gross {
  grid-column: span 2;
  aspect-ratio: 16 / 10;
}

.kachel {
  position: relative;
  display: block;
  overflow: hidden;
  height: 100%;
  border-radius: 0.875rem;
  background: var(--span);
  color: #fff;
  text-decoration: none;
}

.kachel picture,
.kachel img {
  display: block;
  width: 100%;
  height: 100%;
}

/* Eine Behandlung für alle Fotos: etwas weniger Farbe, etwas mehr Kontrast, ein warmer Ton –
   so stehen Bilder aus verschiedenen Händen als eine Reihe. */
.kachel img {
  object-fit: cover;
  filter: saturate(0.72) contrast(1.08) sepia(0.14) brightness(0.97);
  transition: scale 0.5s ease;
}

/* Dunkler Verlauf unten: Der Name bleibt auf jedem Foto lesbar. */
.kachel::after {
  content: "";
  position: absolute;
  inset: 35% 0 0;
  background: linear-gradient(rgb(20 14 10 / 0%), rgb(20 14 10 / 88%));
  pointer-events: none;
}

.kachel b {
  position: absolute;
  z-index: 1;
  right: 0.75rem;
  bottom: 0.625rem;
  left: 0.75rem;
  font-size: 1.125rem;
  line-height: 1.1;
  font-weight: 700;
  text-wrap: balance;
}

.gross .kachel b {
  right: 1rem;
  bottom: 0.875rem;
  left: 1rem;
  font-size: clamp(1.75rem, 3.6vw, 3rem);
  line-height: 1;
  letter-spacing: -0.015em;
}

.plus {
  position: absolute;
  z-index: 1;
  top: 0.5rem;
  right: 0.5rem;
  width: 2rem;
  height: 2rem;
  padding: 0.4375rem;
  border-radius: 50%;
  background: #fff;
  fill: none;
  stroke: var(--kreide);
  stroke-width: 2.5;
  stroke-linecap: round;
  transition: background-color 0.2s ease, stroke 0.2s ease, rotate 0.3s ease;
}

.kachel:focus-visible {
  outline: 3px solid var(--kreide);
  outline-offset: 3px;
}

.klein {
  margin-top: 0.75rem;
  color: var(--leise);
  font-size: 1rem;
}

/* ---- Abschnitte ---- */

.band {
  padding: clamp(3.5rem, 8vw, 7rem) 0;
}

.band h2 {
  font-size: clamp(2.25rem, 5vw, 4rem);
  line-height: 1;
  font-weight: 700;
  letter-spacing: -0.02em;
  hyphens: manual;
  text-wrap: balance;
}

.band h3 {
  margin-top: 1.75rem;
  font-size: 1.3125rem;
  font-weight: 700;
}

.zwei {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 2rem;
}

/* ---- Seine Sätze: groß, dazwischen eine blaue Linie wie von der Schlagschnur ---- */

.worte {
  display: grid;
  gap: clamp(1.5rem, 3vw, 2.5rem);
}

.wort {
  max-width: 24em;
  padding-top: clamp(1.5rem, 3vw, 2.5rem);
  border-top: 2px solid var(--kreide);
  font-size: clamp(1.625rem, 3.4vw, 2.875rem);
  line-height: 1.15;
  font-weight: 700;
  letter-spacing: -0.015em;
  hyphens: manual;
  text-wrap: pretty;
}

.wort-von {
  color: var(--leise);
}

/* ---- Versicherung ---- */

.kreide {
  background: var(--kreide);
  color: #fff;
}

.gross-satz {
  max-width: 26em;
  margin-top: 1rem;
  font-size: clamp(1.375rem, 2.4vw, 2rem);
  line-height: 1.25;
  hyphens: manual;
}

.knopf-hell {
  flex: 0 1 auto;
  border-color: #fff;
  background: #fff;
  color: var(--kreide);
}

/* ---- Kontakt und Anfrage ---- */

.kohle {
  background: var(--kohle);
  color: #fff;
}

.kohle .nummer {
  margin-top: 1rem;
}

.kohle p {
  margin-top: 0.5rem;
}

.verweis {
  display: inline-flex;
  align-items: center;
  min-height: 2.75rem;
  font-weight: 700;
}

.anschrift {
  font-size: 1.3125rem;
  font-weight: 700;
}

.kohle .zeiten {
  margin-top: 0.5rem;
}

.zeiten div {
  display: flex;
  gap: 1rem;
}

.zeiten dt {
  min-width: 5rem;
  font-weight: 700;
}

.zeiten dd {
  margin: 0;
}

.weg {
  max-width: 30em;
}

.kohle .klein {
  margin-top: 1.5rem;
  color: #fff;
}

.karte {
  padding: 1.5rem;
  border-radius: 1rem;
  background: var(--papier);
  color: var(--schrift);
  box-shadow: 0 2rem 4rem -2rem rgb(0 0 0 / 70%);
}

.karte .anfrage {
  max-width: none;
}

.karte .feld input,
.karte .feld select {
  min-height: 3.25rem;
  border-width: 1.5px;
  border-radius: 0.625rem;
  background: #fff;
  font-size: 1.1875rem;
}

.karte .anfrage button {
  flex: 1 1 12rem;
  min-height: 3.25rem;
  border-radius: 0.625rem;
  font-size: 1.1875rem;
}

.karte .anfrage-klein {
  font-size: 1rem;
}

.karte :focus-visible {
  outline-color: var(--kreide);
}

/* ---- Fuß ---- */

.fuss {
  margin-top: 0;
  padding: 2rem max(var(--rand), calc((100vw - 76rem) / 2 + var(--rand))) 5rem;
  border-top: 1px solid rgb(255 255 255 / 25%);
  background: var(--kohle);
  color: #fff;
  font-size: 1.0625rem;
}

.fuss-muster,
.fuss-macher {
  color: #fff;
}

.fuss a {
  padding: 0.6875rem 0;
}

/* ---- Mittel: drei Spalten ---- */

@media (min-width: 34rem) {
  .raster {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.75rem;
  }

  .raster .gross {
    grid-row: span 2;
    aspect-ratio: auto;
  }

  .kachel b {
    right: 1rem;
    bottom: 0.875rem;
    left: 1rem;
    font-size: clamp(1.25rem, 1.9vw, 1.625rem);
  }

  .gross .kachel b {
    right: 1.5rem;
    bottom: 1.25rem;
    left: 1.5rem;
  }

  .plus {
    top: 0.75rem;
    right: 0.75rem;
    width: 2.5rem;
    height: 2.5rem;
    padding: 0.5625rem;
  }

  .knopf {
    flex: 0 1 auto;
  }
}

/* ---- Breit: vier Spalten, Kopf in einer Zeile ---- */

@media (min-width: 60rem) {
  .kopf {
    padding: 1.5rem 0 1.25rem;
  }

  .kopf-zeile {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 2rem;
    align-items: end;
  }

  .kopf-ruf {
    justify-items: end;
  }

  .nummer {
    justify-self: end;
  }

  .raster {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .zwei {
    grid-template-columns: minmax(0, 6fr) minmax(0, 5fr);
    gap: 4rem;
    align-items: start;
  }

  .kreide .zwei {
    align-items: end;
  }

  .kreide .knoepfe {
    justify-content: flex-end;
  }

  .karte {
    padding: 2rem;
  }
}

/* ---- Zeiger und Bewegung ---- */

@media (hover: hover) and (pointer: fine) {
  .kachel:hover img {
    scale: 1.06;
  }

  .kachel:hover .plus {
    background: var(--kreide);
    stroke: #fff;
    rotate: 90deg;
  }

  .knopf:hover {
    translate: 0 -2px;
    box-shadow: 0 0.75rem 1.5rem -0.75rem rgb(27 79 196 / 70%);
  }

  .knopf-leise:hover {
    background: var(--kreide);
    color: #fff;
  }
}

/* Die Sätze kommen beim Rollen herein. Nur wo der Browser es ohne Skript kann und niemand Ruhe verlangt;
   der erste Bildschirm und das Raster warten auf nichts. */
@media (prefers-reduced-motion: no-preference) {
  @supports (animation-timeline: view()) {
    .zeig {
      animation: zeig linear both;
      animation-timeline: view();
      animation-range: entry 0% entry 50%;
    }

    @keyframes zeig {
      from {
        opacity: 0;
        translate: 0 2rem;
      }
    }
  }
}

@media (prefers-reduced-motion: reduce) {
  .knopf,
  .kachel img,
  .plus {
    transition: none;
  }
}
