/* selbstgebaute-moebel.de – Design 2026, Version 2
   Motiv: die Schichtkante einer Multiplexplatte – als Logo-Zeichen und als dünne Kante */

@font-face {
  font-family: "Bricolage Grotesque";
  src: url("fonts/bricolage-grotesque-latin-wght.woff2") format("woff2-variations"),
       url("fonts/bricolage-grotesque-latin-wght.woff2") format("woff2");
  font-weight: 200 800; font-style: normal; font-display: swap;
}

:root {
  --paper: #ffffff;
  --surface: #f4f4f1;
  --surface-2: #ecebe6;
  --line: #e6e5e0;
  --ink: #1a2321;
  --ink-soft: #5b6663;
  --birch: #e8d5ae;
  --birch-2: #d8bd88;
  --birch-dark: #b48a50;
  --clamp: #1d58a6;           /* Links */
  --clamp-dark: #154584;
  --tip: #edf2fa;
  --display: "Bricolage Grotesque", system-ui, sans-serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --step-0: 1.0625rem;
  --step-1: 1.25rem;
  --step-2: 1.5rem;
  --step-3: clamp(1.625rem, 1.3rem + 1.4vw, 2.125rem);
  --step-4: clamp(2.25rem, 1.6rem + 3vw, 3.75rem);
  --gutter: 20px;
  --r-s: 10px;
  --r-m: 16px;
  --r-l: 24px;
  --ply: repeating-linear-gradient(to bottom,
      var(--birch) 0 2px, var(--birch-dark) 2px 3px,
      var(--birch-2) 3px 5px, var(--birch-dark) 5px 6px);
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 96px; }
body {
  margin: 0; background: var(--paper); color: var(--ink);
  font: 400 var(--step-0)/1.7 var(--sans);
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--clamp); text-underline-offset: 0.2em; text-decoration-thickness: 1px; }
a:hover { color: var(--clamp-dark); text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--clamp); outline-offset: 3px; border-radius: 4px; }

h1, h2, h3 { font-family: var(--display); color: var(--ink); text-wrap: balance; font-optical-sizing: auto; }
h1 { font-size: var(--step-4); font-weight: 750; line-height: 1.02; letter-spacing: -0.025em; margin: 0.1em 0 0.35em; }
h2 { font-size: var(--step-3); font-weight: 700; line-height: 1.1; letter-spacing: -0.015em; margin: 2.2em 0 0.6em; }
h3 { font-size: var(--step-1); font-weight: 650; line-height: 1.25; letter-spacing: -0.005em; margin: 1.4em 0 0.3em; }
p, ul, ol, dl { margin: 0 0 1em; }

.wrap { max-width: 1200px; margin: 0 auto; padding: 0 var(--gutter); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -999px; top: 0; background: var(--ink); color: #fff; padding: 8px 12px; z-index: 20; border-radius: var(--r-s); }
.skip:focus { left: 8px; top: 8px; }

/* ---------- Kopf ---------- */
.site-header {
  position: sticky; top: 0; z-index: 10;
  background: rgba(255, 255, 255, 0.88);
  -webkit-backdrop-filter: saturate(1.6) blur(14px); backdrop-filter: saturate(1.6) blur(14px);
  border-bottom: 1px solid var(--line);
}
.header-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 24px; padding-top: 12px; padding-bottom: 10px; }
.brand { display: inline-flex; align-items: center; gap: 12px; color: var(--ink); text-decoration: none; }
.brand:hover { color: var(--ink); }
.brand-mark { width: 34px; height: 34px; border-radius: 9px; background: var(--ply); flex: 0 0 auto; box-shadow: inset 0 0 0 1px rgba(0,0,0,.06); }
.brand-text { display: flex; flex-direction: column; }
.brand-name { font-family: var(--display); font-weight: 750; font-size: 1.375rem; line-height: 1; letter-spacing: -0.02em; }
.brand-claim { font-size: 0.8125rem; color: var(--ink-soft); margin-top: 3px; }

.main-nav { width: 100%; }
@media (min-width: 980px) { .main-nav { width: auto; } }
.main-nav ul {
  list-style: none; margin: 0 calc(var(--gutter) * -1); padding: 2px var(--gutter);
  display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none;
}
@media (min-width: 980px) { .main-nav ul { margin: 0; padding: 0; } }
.main-nav ul::-webkit-scrollbar { display: none; }
.main-nav a {
  display: block; white-space: nowrap; padding: 7px 14px; border-radius: 999px;
  color: var(--ink); text-decoration: none; font-size: 0.9375rem; font-weight: 500;
}
.main-nav a:hover { background: var(--surface); color: var(--ink); }
.main-nav a[aria-current] { background: var(--ink); color: #fff; }

/* ---------- Brotkrumen ---------- */
.crumbs ol { list-style: none; display: flex; flex-wrap: wrap; padding: 20px 0 0; margin: 0; font-size: 0.875rem; color: var(--ink-soft); }
.crumbs li + li::before { content: "›"; margin: 0 8px; color: var(--ink-soft); }
.crumbs a { color: var(--ink-soft); text-decoration: none; }
.crumbs a:hover { color: var(--ink); text-decoration: underline; }

/* ---------- Layout ---------- */
.layout { display: grid; gap: 48px; padding-top: 8px; padding-bottom: 72px; }
.content { min-width: 0; }
.content > p, .prose p, .prose ul, .lead { max-width: 66ch; }
@media (min-width: 1000px) {
  .layout { grid-template-columns: minmax(0, 1fr) 290px; gap: 64px; }
  .sidebar { padding-top: 24px; }
  .sidebar-inner { position: sticky; top: 96px; }
}
.lead { font-size: clamp(1.125rem, 1rem + 0.5vw, 1.3125rem); line-height: 1.6; color: var(--ink); }
.prose ul { padding-left: 1.2em; }
.prose li { margin-bottom: 0.4em; }
.prose li::marker { color: var(--birch-dark); }

/* ---------- Buttons & Chips ---------- */
.actions { display: flex; flex-wrap: wrap; gap: 10px; }
.button {
  display: inline-flex; align-items: center; gap: 8px; background: var(--ink); color: #fff; text-decoration: none;
  font-weight: 600; font-size: 1rem; padding: 13px 22px; border-radius: 999px; border: 1.5px solid var(--ink);
  transition: background-color .15s, color .15s;
}
.button:hover { background: #33403d; color: #fff; border-color: #33403d; }
.button-ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.button-ghost:hover { background: var(--surface); color: var(--ink); border-color: var(--surface-2); }
.chip {
  display: inline-block; font-size: 0.8125rem; font-weight: 600; color: var(--ink); text-decoration: none;
  background: var(--birch); padding: 4px 12px; border-radius: 999px;
}
.chip:hover { background: var(--birch-2); color: var(--ink); }

/* ---------- Startseite ---------- */
.hero { display: grid; gap: 28px; padding: 32px 0 8px; align-items: center; }
.hero h1 { margin-top: 0; }
@media (min-width: 760px) { .hero { grid-template-columns: 1.15fr 1fr; gap: 48px; padding-top: 48px; } }
.hero-img { margin: 0; position: relative; }
.hero-img img { width: 100%; border-radius: var(--r-l); }
.hero-img figcaption {
  position: absolute; left: 14px; bottom: 14px; right: 14px; width: fit-content;
  font-size: 0.8125rem; line-height: 1.4; color: var(--ink);
  background: rgba(255,255,255,.9); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
  padding: 6px 12px; border-radius: 999px;
}

.rooms { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 10px; }
.rooms a {
  display: flex; flex-direction: column; padding: 14px 20px; border-radius: var(--r-m);
  background: var(--surface); text-decoration: none; color: var(--ink); min-width: 0;
}
.rooms li { flex: 1 1 240px; }
.rooms a { height: 100%; }
.rooms a:hover { background: var(--surface-2); color: var(--ink); }
.rooms strong { font-family: var(--display); font-size: var(--step-1); font-weight: 700; letter-spacing: -0.01em; }
.rooms span { font-size: 0.9375rem; color: var(--ink-soft); line-height: 1.5; }

/* ---------- Anleitungs-Karten ---------- */
.cards { list-style: none; padding: 0; margin: 0 0 1em; display: grid; gap: 28px 24px; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
.card a { display: flex; flex-direction: column; height: 100%; text-decoration: none; color: var(--ink); }
.card-media { position: relative; display: block; overflow: hidden; border-radius: var(--r-m); background: var(--surface); }
.card-media img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; transition: transform .35s ease; }
.card a:hover .card-media img { transform: scale(1.04); }
.card-room {
  position: absolute; left: 10px; top: 10px; font-size: 0.75rem; font-weight: 600;
  background: rgba(255,255,255,.92); color: var(--ink); padding: 3px 10px; border-radius: 999px;
}
.card-body { display: flex; flex-direction: column; gap: 4px; padding: 14px 2px 0; }
.card-title { font-family: var(--display); font-weight: 700; font-size: 1.3125rem; line-height: 1.2; letter-spacing: -0.01em; }
.card-text { font-size: 0.9375rem; color: var(--ink-soft); line-height: 1.5; }
.card a:hover .card-title { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 0.15em; }
@media (max-width: 599px) {
  .cards { gap: 16px; }
  .card a { flex-direction: row; gap: 14px; align-items: center; }
  .card-media { flex: 0 0 116px; }
  .card-media img { aspect-ratio: 1 / 1; }
  .card-room { display: none; }
  .card-body { padding: 0; }
  .card-title { font-size: 1.125rem; }
  .card-text { font-size: 0.875rem; }
}

/* ---------- Kopf einer Anleitung ---------- */
.guide-head { display: grid; gap: 24px; padding-top: 20px; padding-bottom: 8px; align-items: center; }
@media (min-width: 760px) { .guide-head { grid-template-columns: 1.1fr 1fr; gap: 48px; padding-top: 28px; } }
.guide-head h1 { margin: 14px 0 12px; }
.guide-teaser { font-size: var(--step-1); color: var(--ink-soft); line-height: 1.5; margin: 0; max-width: 34ch; }
.guide-head-img { margin: 0; }
.guide-head-img img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; border-radius: var(--r-l); }

/* ---------- Steckbrief ---------- */
.steckbrief {
  margin: 28px 0 32px; padding: 6px 22px; background: var(--surface); border-radius: var(--r-m);
  display: grid; max-width: 66ch; position: relative; overflow: hidden;
}
.steckbrief::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 6px; background: var(--ply); }
.steckbrief div { display: grid; gap: 2px 20px; padding: 14px 0; border-bottom: 1px solid var(--surface-2); }
.steckbrief div:first-child { padding-top: 18px; }
.steckbrief div:last-child { border-bottom: 0; }
@media (min-width: 560px) { .steckbrief div { grid-template-columns: 8.5em 1fr; } }
.steckbrief dt { font-weight: 650; font-size: 0.9375rem; }
.steckbrief dd { margin: 0; color: var(--ink-soft); }

/* ---------- Arbeitsschritte ---------- */
.steps ol { list-style: none; counter-reset: step; padding: 0; max-width: 66ch; }
.steps li { counter-increment: step; position: relative; padding: 0 0 12px 60px; }
.steps li::before {
  content: counter(step); position: absolute; left: 0; top: 0;
  width: 40px; height: 40px; border-radius: 50%; background: var(--birch); color: var(--ink);
  font: 700 1.125rem/40px var(--display); text-align: center;
}
.steps li:not(:last-child)::after { content: ""; position: absolute; left: 19px; top: 48px; bottom: 4px; width: 2px; background: var(--line); }
.steps h3 { margin-top: 6px; }

/* ---------- Tipp, Hinweis ---------- */
.tip { background: var(--tip); border-radius: var(--r-m); padding: 16px 20px; max-width: 66ch; }
.notice { background: #fff4d6; border-radius: var(--r-s); padding: 12px 16px; }

/* ---------- Galerie ---------- */
.gallery-grid { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); }
.gallery figure { margin: 0; }
.gallery a { display: block; overflow: hidden; border-radius: var(--r-s); }
.gallery img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; background: var(--surface); transition: transform .35s ease; }
.gallery a:hover img { transform: scale(1.04); }
.gallery figcaption { font-size: 0.8125rem; color: var(--ink-soft); margin-top: 6px; line-height: 1.4; }

/* ---------- Materialliste ---------- */
.material { margin: 36px 0; max-width: 66ch; }
.material ul { list-style: none; padding: 4px 20px; background: var(--surface); border-radius: var(--r-m); }
.material li { display: grid; grid-template-columns: 1fr auto; gap: 2px 16px; padding: 14px 0; border-bottom: 1px solid var(--surface-2); align-items: center; }
.material li:last-child { border-bottom: 0; }
.m-name { font-weight: 600; }
.m-note { grid-column: 1; grid-row: 2; font-size: 0.875rem; color: var(--ink-soft); line-height: 1.45; }
.m-buy { grid-column: 2; grid-row: 1 / span 2; font-size: 0.875rem; white-space: nowrap; }
.m-buy a.aff {
  display: inline-block; text-decoration: none; color: var(--ink); background: var(--paper);
  border: 1px solid var(--line); border-radius: 999px; padding: 6px 12px; font-weight: 600;
}
.m-buy a.aff:hover { border-color: var(--ink); color: var(--ink); }
@media (max-width: 480px) {
  .material li { grid-template-columns: 1fr; }
  .m-note, .m-buy { grid-column: 1; grid-row: auto; }
  .m-buy { margin-top: 6px; }
}
.aff-mark { color: var(--ink-soft); font-size: 0.75em; margin-left: 2px; }

/* ---------- Checkliste Werkzeug ---------- */
.checklist { list-style: none; padding: 0; max-width: 66ch; }
.checklist li { padding: 14px 0 14px 36px; border-bottom: 1px solid var(--line); position: relative; }
.checklist li::before { content: ""; position: absolute; left: 2px; top: 19px; width: 18px; height: 18px; border: 2px solid var(--birch-dark); border-radius: 6px; }

/* ---------- Tabelle Holzarten ---------- */
.table-scroll { overflow-x: auto; border-radius: var(--r-m); background: var(--surface); padding: 4px; }
.wood { border-collapse: collapse; width: 100%; min-width: 720px; font-size: 0.9375rem; line-height: 1.45; }
.wood th, .wood td { text-align: left; vertical-align: top; padding: 12px 14px; border-bottom: 1px solid var(--surface-2); }
.wood thead th { font-family: var(--display); font-weight: 700; font-size: 0.9375rem; }
.wood tbody tr:last-child th, .wood tbody tr:last-child td { border-bottom: 0; }
.wood tbody th { font-weight: 650; min-width: 13em; }
.wood tbody th small { display: block; font-weight: 400; font-size: 0.8125rem; color: var(--ink-soft); font-style: italic; font-family: var(--sans); }
@media (max-width: 699px) {
  .table-scroll { overflow: visible; background: none; padding: 0; }
  .wood, .wood tbody, .wood tr, .wood th, .wood td { display: block; min-width: 0; }
  .wood thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .wood tr { background: var(--surface); border-radius: var(--r-m); margin-bottom: 12px; padding: 8px 0; }
  .wood th, .wood td { border: 0; padding: 4px 16px; }
  .wood tbody th { font-family: var(--display); font-size: var(--step-1); }
  .wood td { display: grid; grid-template-columns: 6.5em 1fr; gap: 8px; }
  .wood td::before { content: attr(data-label); font-weight: 600; color: var(--ink-soft); }
}

/* ---------- Webmaster ---------- */
.code { width: 100%; font: 0.875rem/1.4 ui-monospace, Menlo, Consolas, monospace; padding: 10px; border: 1px solid var(--line); border-radius: var(--r-s); margin-top: 6px; background: var(--surface); }

/* ---------- Seitenleiste ---------- */
.side-box { margin-bottom: 20px; background: var(--surface); border-radius: var(--r-m); padding: 18px 20px; }
.side-box h2 { font-size: 1.0625rem; margin: 0 0 8px; letter-spacing: 0; }
.side-guides, .side-links { list-style: none; padding: 0; margin: 0; }
.side-guides a { display: grid; grid-template-columns: 52px 1fr; gap: 12px; align-items: center; padding: 7px 0; text-decoration: none; color: var(--ink); font-size: 0.9375rem; line-height: 1.35; }
.side-guides img { width: 52px; height: 52px; object-fit: cover; border-radius: var(--r-s); }
.side-guides a:hover span, .side-links a:hover { color: var(--clamp); text-decoration: underline; }
.side-guides a[aria-current], .side-links a[aria-current] { font-weight: 650; }
.side-links a { display: block; padding: 6px 0; text-decoration: none; color: var(--ink); font-size: 0.9375rem; }
@media (max-width: 999px) { .sidebar .side-box:first-child { display: none; } }

/* ---------- Anzeigen ---------- */
.ad { margin: 32px 0; min-height: 280px; }
.ad-label { display: block; font-size: 0.75rem; color: var(--ink-soft); margin-bottom: 4px; }
@media (max-width: 999px) { .ad-seitenleiste { display: none; } }

/* ---------- Mehr Anleitungen ---------- */
.more { margin-top: 56px; }

/* ---------- Fuß ---------- */
.site-footer { background: var(--surface); color: var(--ink-soft); font-size: 0.9375rem; position: relative; }
.site-footer::before { content: ""; display: block; height: 6px; background: var(--ply); }
.footer-inner { display: grid; gap: 24px; padding-top: 40px; padding-bottom: 24px; }
@media (min-width: 760px) { .footer-inner { grid-template-columns: 1.4fr 1fr; gap: 64px; } }
.footer-brand .brand { margin-bottom: 14px; }
.footer-brand .brand-mark { width: 28px; height: 28px; border-radius: 8px; }
.footer-brand .brand-name { font-size: 1.125rem; }
.disclosure { max-width: 60ch; margin: 0; }
.footer-links { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; }
.footer-links a { color: var(--ink); text-decoration: none; }
.footer-links a:hover { text-decoration: underline; }
.copy { color: var(--ink-soft); font-size: 0.8125rem; padding-bottom: 32px; margin: 0 auto; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
}
@media print {
  .site-header, .sidebar, .ad, .more, .site-footer .footer-links { display: none; }
  .layout { display: block; }
}
