/* basteldude.org — gemeinsames Stylesheet
   Idee: Die Startseite ist ein Kleinteilemagazin. Rubriken sind Schränke,
   Fächer sind Schubladen mit Beschriftungskärtchen. Alles andere bleibt ruhig. */

:root {
  --wall: #dde2e5;       /* Werkstattwand */
  --steel: #3e5866;      /* Schrankkorpus, Hammerschlag-Blaugrau */
  --steel-dark: #2c414c;
  --drawer: #c7d2d8;     /* Schubladenfront */
  --card: #fbfbf7;       /* Beschriftungskärtchen */
  --ink: #1b252b;
  --soft: #55646c;
  --signal: #f0bd2b;     /* Werkzeuggelb, nur für Fokus und offene Schublade */
  --radius-drawer: 3px;
  --font: "Bricolage Grotesque", "Segoe UI", system-ui, sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root {
    --wall: #151b1f;
    --steel: #2d414c;
    --steel-dark: #1f2e36;
    --drawer: #3b505b;
    --card: #e4e9eb;
    --ink: #e6ecef;
    --soft: #9fb0b8;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--wall);
  color: var(--ink);
  font: 300 1.0625rem/1.55 var(--font);
  font-optical-sizing: auto;
}
a { color: inherit; }
:focus-visible { outline: 3px solid var(--signal); outline-offset: 3px; }

.page { max-width: 62rem; margin: 0 auto; padding: 3.5rem 1.25rem 4rem; }

.site-head { margin-bottom: 3rem; max-width: 38rem; }
.site-head h1 {
  font-weight: 700; font-size: clamp(2.4rem, 7vw, 4rem);
  line-height: .95; letter-spacing: -.02em; margin: 0 0 .9rem;
}
.site-head p { margin: 0; color: var(--soft); font-size: 1.15rem; }

/* ---------- Schrank ---------- */
.cabinet { margin-bottom: 3rem; }
.cabinet-name {
  font-weight: 500; font-size: 1.35rem; margin: 0 0 .6rem .2rem;
}
.cabinet-body {
  background: var(--steel);
  border-radius: 6px;
  padding: 12px;
  box-shadow: inset 0 -6px 0 var(--steel-dark);
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
}
.drawer.empty { cursor: default; opacity: .55; }
.drawer.empty .label { opacity: .5; min-width: 55%; }
.drawer.empty:hover { transform: none; }
.drawer {
  appearance: none; border: 0; cursor: pointer; font: inherit; color: var(--ink);
  background: var(--drawer);
  border-radius: var(--radius-drawer);
  min-height: 6.25rem;
  padding: 14px 14px 12px;
  display: grid; grid-template-rows: auto 1fr auto; justify-items: center; gap: 8px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.35), inset 0 -2px 0 rgba(0,0,0,.12);
  transition: transform .18s ease, box-shadow .18s ease;
}
.drawer .label {
  background: var(--card); color: #1b252b;
  padding: .3rem .8rem; min-width: 70%;
  font-weight: 500; font-size: 1.05rem; text-align: center;
  border: 1px solid rgba(0,0,0,.18);
  box-shadow: 0 0 0 3px rgba(0,0,0,.08); /* Kartenhalter */
}
.drawer .count { color: var(--soft); font-size: .9rem; align-self: end; }
.drawer .handle {
  width: 42%; height: 7px; border-radius: 4px;
  background: var(--steel-dark); opacity: .55;
}
.drawer:hover { transform: translateY(-1px); }
.drawer[aria-expanded="true"] {
  transform: translateY(5px) scale(1.02);
  box-shadow: 0 -8px 0 -2px rgba(0,0,0,.35), 0 6px 14px rgba(0,0,0,.25);
}
.drawer[aria-expanded="true"] .handle { background: var(--signal); opacity: 1; }

/* ---------- Inhalt einer offenen Schublade ---------- */
.contents {
  margin-top: 14px;
  background: var(--card); color: #1b252b;
  border-radius: 4px;
  padding: 1.25rem 1.4rem .6rem;
  box-shadow: 0 2px 0 rgba(0,0,0,.08);
}
.contents[hidden] { display: none; }
.contents h3 { margin: 0 0 .6rem; font-weight: 500; font-size: 1.1rem; color: #55646c; }
.contents ul { list-style: none; margin: 0; padding: 0; }
.contents li { border-top: 1px solid #dfe4e6; }
.contents li:first-child { border-top: 0; }
.contents a {
  display: block; padding: .8rem 0; text-decoration: none;
}
.contents a strong { display: block; font-weight: 700; font-size: 1.15rem; }
.contents a span { color: #55646c; }
.contents a:hover strong { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 3px; }
@media (prefers-reduced-motion: no-preference) {
  .contents.opening { animation: slide .22s ease-out; }
  @keyframes slide { from { opacity: 0; transform: translateY(-8px); } }
}
@media (prefers-reduced-motion: reduce) {
  .drawer { transition: none; }
}

/* ---------- Fuß ---------- */
.site-foot {
  margin-top: 4rem; color: var(--soft); font-size: .95rem;
  display: flex; flex-wrap: wrap; gap: .4rem 1.5rem;
}
.site-foot a { color: var(--soft); }

@media (max-width: 40rem) {
  .page { padding-top: 2.25rem; }
  .cabinet-body { grid-template-columns: 1fr 1fr; padding: 9px; gap: 8px; }
  .drawer { min-height: 5.5rem; padding: 10px 8px; }
  .drawer .label { min-width: 90%; font-size: .98rem; }
}
