/* =========================================================
   Tischlerei Brandt – Stylesheet
   Farben, Schriften und Abstände stehen ganz oben als Variablen.
   ========================================================= */

@font-face {
  font-family: "Bricolage Grotesque";
  src: url("/fonts/bricolage-grotesque.woff2") format("woff2-variations");
  font-weight: 200 800;
  font-stretch: 75% 100%;
  font-display: swap;
}
@font-face {
  font-family: "Instrument Sans";
  src: url("/fonts/instrument-sans-400.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "Instrument Sans";
  src: url("/fonts/instrument-sans-500.woff2") format("woff2");
  font-weight: 500;
  font-display: swap;
}
@font-face {
  font-family: "Instrument Sans";
  src: url("/fonts/instrument-sans-600.woff2") format("woff2");
  font-weight: 600;
  font-display: swap;
}

:root {
  --weiss: #ffffff;
  --flaeche: #f2f4f1;
  --fichte: #1e3b33;
  --fichte-hell: #2d5247;
  --text: #2a302d;
  --grau: #5b645f;
  --linie: #d7ddd8;
  --gelb: #f2c230;
  --rot: #c3281c;

  --schrift-titel: "Bricolage Grotesque", "Avenir Next Condensed", "Arial Narrow", sans-serif;
  --schrift-text: "Instrument Sans", "Helvetica Neue", Arial, sans-serif;

  --breite: 1240px;
  --rand: clamp(20px, 5vw, 56px);
  --abstand: clamp(72px, 10vw, 136px);
  --radius: 6px;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 88px;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--weiss);
  color: var(--text);
  font-family: var(--schrift-text);
  font-size: 1.125rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

h1, h2, h3 {
  font-family: var(--schrift-titel);
  color: var(--fichte);
  margin: 0;
  font-stretch: 88%;
  text-wrap: balance;
}
h1 {
  font-size: clamp(2.6rem, 5.4vw, 4.6rem);
  font-weight: 700;
  line-height: 1.02;
  letter-spacing: -0.025em;
}
h2 {
  font-size: clamp(2rem, 3.4vw, 3rem);
  font-weight: 650;
  line-height: 1.08;
  letter-spacing: -0.02em;
}
h3 {
  font-size: 1.3rem;
  font-weight: 600;
  line-height: 1.25;
  letter-spacing: -0.005em;
}
p { margin: 0; }

a { color: var(--fichte); }

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

address { font-style: normal; }

.springen {
  position: absolute;
  left: 12px;
  top: -60px;
  background: var(--fichte);
  color: var(--weiss);
  padding: 10px 16px;
  border-radius: var(--radius);
  z-index: 100;
}
.springen:focus { top: 12px; }

/* ---------- Knöpfe & Links ---------- */
.knopf {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  padding: 0 26px;
  border-radius: var(--radius);
  background: var(--fichte);
  border: 2px solid var(--fichte);
  color: var(--weiss);
  font-weight: 600;
  font-size: 1.0625rem;
  text-decoration: none;
  transition: background-color 0.15s ease, color 0.15s ease;
}
.knopf:hover { background: var(--fichte-hell); border-color: var(--fichte-hell); }
.knopf--leise { background: transparent; color: var(--fichte); }
.knopf--leise:hover { background: var(--flaeche); color: var(--fichte); border-color: var(--fichte); }
.knopf--klein { min-height: 42px; padding: 0 18px; font-size: 1rem; }

.textlink {
  display: inline-block;
  margin-top: 10px;
  font-weight: 600;
  text-underline-offset: 4px;
}

/* ---------- Kopfzeile ---------- */
.kopf {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: saturate(1.4) blur(8px);
  border-bottom: 1px solid var(--linie);
}
.kopf__innen {
  max-width: var(--breite);
  margin: 0 auto;
  padding: 14px var(--rand);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.marke { text-decoration: none; display: flex; flex-direction: column; line-height: 1.15; }
.marke__name {
  font-family: var(--schrift-titel);
  font-stretch: 88%;
  font-weight: 700;
  font-size: 1.35rem;
  color: var(--fichte);
  letter-spacing: -0.01em;
}
.marke__zusatz { font-size: 0.875rem; color: var(--grau); }

.navigation { display: flex; align-items: center; gap: 28px; }
.navigation ul { display: flex; gap: 24px; list-style: none; margin: 0; padding: 0; }
.navigation ul a {
  color: var(--text);
  text-decoration: none;
  font-weight: 500;
  font-size: 1rem;
  padding: 6px 0;
  border-bottom: 2px solid transparent;
}
.navigation ul a:hover { border-bottom-color: var(--fichte); color: var(--fichte); }

.menue-knopf {
  display: none;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  padding: 0 14px;
  border: 1px solid var(--linie);
  border-radius: var(--radius);
  background: var(--weiss);
  color: var(--fichte);
  font: 600 1rem var(--schrift-text);
  cursor: pointer;
}
.menue-knopf__linien,
.menue-knopf__linien::before,
.menue-knopf__linien::after {
  display: block;
  width: 18px;
  height: 2px;
  background: currentColor;
  position: relative;
  transition: transform 0.2s ease, background-color 0.2s ease;
}
.menue-knopf__linien::before,
.menue-knopf__linien::after { content: ""; position: absolute; left: 0; }
.menue-knopf__linien::before { top: -6px; }
.menue-knopf__linien::after { top: 6px; }
.menue-knopf[aria-expanded="true"] .menue-knopf__linien { background: transparent; }
.menue-knopf[aria-expanded="true"] .menue-knopf__linien::before { transform: translateY(6px) rotate(45deg); }
.menue-knopf[aria-expanded="true"] .menue-knopf__linien::after { transform: translateY(-6px) rotate(-45deg); }

/* ---------- Hero ---------- */
.hero { padding-top: clamp(40px, 6vw, 88px); }
.hero__innen {
  max-width: var(--breite);
  margin: 0 auto;
  padding: 0 var(--rand);
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  gap: clamp(32px, 5vw, 72px);
  align-items: center;
}
.hero__lead {
  margin-top: 28px;
  font-size: clamp(1.125rem, 1.5vw, 1.3rem);
  color: var(--grau);
  max-width: 34em;
}
.hero__knoepfe { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 36px; }
.hero__bild { margin: 0; }
.hero__bild img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: var(--radius);
}

/* ---------- Zollstock (das eine laute Element der Seite) ---------- */
.zollstock {
  margin-top: clamp(48px, 7vw, 96px);
  overflow: hidden;
  border-top: 1px solid #c99a12;
  border-bottom: 1px solid #c99a12;
  background: var(--gelb);
}
.zollstock__band {
  display: flex;
  width: max-content;
  animation: aufklappen 1.1s cubic-bezier(0.2, 0.7, 0.2, 1) 0.15s both;
}
.zollstock__cm {
  position: relative;
  flex: 0 0 40px;
  height: 46px;
  /* cm-Strich links, halber cm in der Mitte, mm-Striche dazwischen */
  /* cm-Strich rechts, halber cm in der Mitte, mm-Striche dazwischen */
  background:
    linear-gradient(#1b1b1b, #1b1b1b) 100% 0 / 1.5px 22px no-repeat,
    linear-gradient(#1b1b1b, #1b1b1b) 19.5px 0 / 1px 15px no-repeat,
    repeating-linear-gradient(90deg, transparent 0 3px, #1b1b1b 3px 4px) 0 0 / 36px 9px no-repeat;
  font-family: var(--schrift-titel);
  font-stretch: 80%;
  font-weight: 650;
  font-size: 0.8rem;
  color: #1b1b1b;
}
.zollstock__cm {
  /* Zahl sitzt unten, mittig unter dem cm-Strich */
  display: flex;
  align-items: flex-end;
  justify-content: flex-end;
  padding: 0 0 6px;
}
.zollstock__cm > span {
  line-height: 1;
  font-variant-numeric: tabular-nums;
  transform: translateX(50%);
}
.zollstock__cm:nth-child(10n) { color: var(--rot); }
.zollstock__cm--gelenk::after {
  /* Gelenk mit Niete alle 20 cm */
  content: "";
  position: absolute;
  right: -1px;
  top: 0;
  bottom: 0;
  width: 2px;
  background: rgba(0, 0, 0, 0.28);
}
.zollstock__cm--gelenk::before {
  content: "";
  position: absolute;
  right: 10px;
  top: 26px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #b8b8b8;
  box-shadow: inset 0 0 0 1.5px #7d7d7d;
}
@keyframes aufklappen {
  from { transform: translateX(-160px); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

/* ---------- Abschnitte ---------- */
.abschnitt { padding: var(--abstand) var(--rand); }
.abschnitt > * { max-width: calc(var(--breite) - 2 * var(--rand)); margin-left: auto; margin-right: auto; }
.abschnitt--flaeche { background: var(--flaeche); }
.abschnitt__kopf { margin-bottom: clamp(36px, 5vw, 56px); }
.abschnitt__kopf h2 { max-width: 18em; }
.einleitung { margin-top: 18px; color: var(--grau); max-width: 36em; }

.zweispaltig {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: clamp(32px, 6vw, 96px);
  align-items: start;
}
.zweispaltig__kopf { position: sticky; top: 120px; }

/* Leistungen */
.leistungen { list-style: none; margin: 0; padding: 0; border-bottom: 1px solid var(--linie); }
.leistung {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(0, 3fr);
  gap: 12px 32px;
  padding: 28px 0;
  border-top: 1px solid var(--linie);
}
.leistung p { color: var(--grau); }

/* Galerie */
.galerie {
  list-style: none;
  margin: 0 auto;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(20px, 3vw, 36px) clamp(16px, 2vw, 28px);
}
.galerie figure { margin: 0; }
.galerie img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: var(--radius);
}
.galerie figcaption { display: flex; flex-direction: column; margin-top: 14px; line-height: 1.4; }
.galerie__titel { font-weight: 600; color: var(--fichte); }
.galerie__holz { color: var(--grau); font-size: 1rem; }

/* Ablauf – echte Reihenfolge, daher nummeriert */
.ablauf {
  list-style: none;
  margin: 0 auto;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 28px;
  position: relative;
}
.ablauf__schritt:not(:last-child)::before {
  /* Verbindungslinie zum nächsten Schritt */
  content: "";
  position: absolute;
  left: 44px;
  right: -28px;
  top: 22px;
  height: 1px;
  background: var(--linie);
}
.ablauf__schritt { position: relative; }
.ablauf__nr {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--weiss);
  border: 1.5px solid var(--fichte);
  color: var(--fichte);
  font-family: var(--schrift-titel);
  font-weight: 700;
  font-size: 1.1rem;
  position: relative;
  margin-bottom: 22px;
}
.ablauf__schritt h3 { margin-bottom: 8px; }
.ablauf__schritt p { color: var(--grau); font-size: 1rem; }

/* Über uns */
.ueber {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: clamp(32px, 6vw, 96px);
  align-items: center;
}
.ueber__bild { margin: 0; }
.ueber__bild img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; border-radius: var(--radius); }
.fliesstext { margin-top: 24px; max-width: 36em; }
.fliesstext p + p { margin-top: 1em; }
.ueber__name {
  margin-top: 28px;
  font-weight: 600;
  color: var(--fichte);
  display: flex;
  flex-direction: column;
}
.ueber__name span { font-weight: 400; color: var(--grau); }
.fakten {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
  margin: 40px 0 0;
  padding-top: 28px;
  border-top: 1px solid var(--linie);
}
.fakt { display: flex; flex-direction: column-reverse; }
.fakt dd {
  margin: 0;
  font-family: var(--schrift-titel);
  font-stretch: 85%;
  font-weight: 700;
  font-size: clamp(1.8rem, 3vw, 2.4rem);
  line-height: 1.1;
  color: var(--fichte);
}
.fakt dt { color: var(--grau); font-size: 1rem; }

/* Kontakt */
.kontakt__telefon {
  display: table;
  font-family: var(--schrift-titel);
  font-stretch: 85%;
  font-weight: 700;
  font-size: clamp(2.2rem, 5vw, 3.8rem);
  line-height: 1.05;
  letter-spacing: -0.02em;
  text-decoration: none;
  color: var(--fichte);
}
.kontakt__telefon:hover { text-decoration: underline; text-decoration-thickness: 3px; text-underline-offset: 8px; }
.kontakt__mail {
  display: table;
  margin-top: 10px;
  font-size: clamp(1.15rem, 2vw, 1.4rem);
  font-weight: 500;
  text-underline-offset: 5px;
  overflow-wrap: anywhere;
}
.kontakt__spalten {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 32px;
  margin-top: 44px;
  padding-top: 32px;
  border-top: 1px solid var(--linie);
}
.kontakt__spalten h3 { font-size: 1.1rem; margin-bottom: 10px; }
.zeiten { margin: 0; }
.zeiten div + div { margin-top: 10px; }
.zeiten dt { font-weight: 500; }
.zeiten dd { margin: 0; color: var(--grau); }

/* Rechtstexte & 404 */
.rechtstext {
  max-width: 760px;
  margin: 0 auto;
  padding: clamp(48px, 8vw, 104px) var(--rand) var(--abstand);
}
.rechtstext h1 { font-size: clamp(2.2rem, 4.5vw, 3.4rem); }
.rechtstext .fliesstext { margin-top: 32px; }
.rechtstext .fliesstext h2 { font-size: 1.4rem; margin: 36px 0 10px; }
.rechtstext .fliesstext h3 { font-size: 1.15rem; margin: 24px 0 8px; }
.rechtstext .fliesstext ul { padding-left: 1.2em; }

/* Fußzeile */
.fuss { border-top: 1px solid var(--linie); }
.fuss__innen {
  max-width: var(--breite);
  margin: 0 auto;
  padding: 36px var(--rand) 44px;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 8px 32px;
  font-size: 1rem;
  color: var(--grau);
}
.fuss__name { font-weight: 600; color: var(--fichte); }
.fuss__links { display: flex; gap: 20px; list-style: none; margin: 0 0 0 auto; padding: 0; }
.fuss__links a { color: var(--grau); text-underline-offset: 4px; }
.fuss__links a:hover { color: var(--fichte); }
.fuss__copy { width: 100%; font-size: 0.9rem; }

/* ---------- Tablet ---------- */
@media (max-width: 1080px) {
  .ablauf { grid-template-columns: repeat(3, minmax(0, 1fr)); row-gap: 44px; }
  .ablauf__schritt::before { display: none; }
  .galerie { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 960px) {
  .menue-knopf { display: inline-flex; }
  .navigation {
    display: none;
    position: absolute;
    left: 0;
    right: 0;
    top: 100%;
    background: var(--weiss);
    border-bottom: 1px solid var(--linie);
    padding: 8px var(--rand) 24px;
    flex-direction: column;
    align-items: stretch;
    gap: 16px;
  }
  .navigation.ist-offen { display: flex; }
  .navigation ul { flex-direction: column; gap: 0; }
  .navigation ul a {
    display: block;
    padding: 14px 0;
    border-bottom: 1px solid var(--linie);
    font-size: 1.125rem;
  }
  .navigation ul a:hover { border-bottom-color: var(--linie); }
  .navigation .knopf { min-height: 52px; }

  .hero__innen,
  .zweispaltig,
  .ueber { grid-template-columns: 1fr; }
  .zweispaltig__kopf { position: static; }
  .hero__bild { order: -1; }
  .ueber__bild img { aspect-ratio: 4 / 3; }
}

/* ---------- Handy ---------- */
@media (max-width: 640px) {
  body { font-size: 1.0625rem; }
  .marke__zusatz { display: none; }
  .hero__knoepfe .knopf { flex: 1 1 100%; }
  .leistung { grid-template-columns: 1fr; padding: 22px 0; }
  .galerie { grid-template-columns: 1fr; }
  .ablauf { grid-template-columns: 1fr; row-gap: 28px; }
  .ablauf__schritt { display: grid; grid-template-columns: 44px 1fr; column-gap: 18px; }
  .ablauf__nr { grid-row: span 2; margin: 0; }
  .fakten { grid-template-columns: 1fr 1fr 1fr; gap: 12px; }
  .kontakt__spalten { grid-template-columns: 1fr; }
  .fuss__links { margin-left: 0; width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .zollstock__band { animation: none; }
  * { transition: none !important; }
}
