/* Werkhof Kaltenried — Beispiel-Website (erfundener Betrieb), Stil aus MXL-017 */

@font-face {
  font-family: "Schibsted Grotesk";
  src: url("fonts/schibsted-grotesk-400.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Schibsted Grotesk";
  src: url("fonts/schibsted-grotesk-500.woff2") format("woff2");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

:root {
  --paper: #fefefe;
  --ink: #000;
  --muted: #6a6a6a;
  --hair: #d0d0d0;
  --line: 1px solid var(--ink);
  --gutter: 20px;
  --head: 64px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --f: "Schibsted Grotesk", "Helvetica Neue", Arial, sans-serif;
  --fs-body: 1.25rem;
  --fs-lead: clamp(1.25rem, 1.1rem + 0.5vw, 1.5rem);
  --fs-small: 0.8125rem;
  --fs-h1: clamp(2.125rem, 1rem + 4.2vw, 4.5rem);
  --fs-h2: clamp(1.75rem, 1rem + 2.6vw, 3.25rem);
  color-scheme: light;
}

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

html {
  -webkit-text-size-adjust: 100%;
  scrollbar-color: var(--ink) var(--paper);
  scroll-padding-top: calc(var(--head) + 12px);
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--f);
  font-size: var(--fs-body);
  font-weight: 400;
  line-height: 1.4;
  overflow-x: clip;
  font-kerning: normal;
}

::selection {
  background: var(--ink);
  color: var(--paper);
}

img,
svg {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
}

h1,
h2,
h3,
h4 {
  margin: 0;
  font-weight: 500;
  text-wrap: balance;
}

p {
  margin: 0 0 1em;
  max-width: 62ch;
  text-wrap: pretty;
}

:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 2px;
}

.caps {
  text-transform: uppercase;
  letter-spacing: 0.01em;
}

.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.skip {
  position: absolute;
  left: var(--gutter);
  top: -100px;
  z-index: 50;
  padding: 12px 16px;
  background: var(--ink);
  color: var(--paper);
  text-decoration: none;
  text-transform: uppercase;
}
.skip:focus {
  top: 8px;
  outline-color: var(--paper);
}

.arrow {
  display: inline-block;
  width: 0.8em;
  height: 0.8em;
  vertical-align: -0.02em;
  stroke: currentColor;
  stroke-width: 1.6;
  fill: none;
  transition: transform 0.4s var(--ease);
}
a:hover .arrow,
a:focus-visible .arrow,
button:hover .arrow {
  transform: translateX(0.2em);
}
a:hover .arrow.up,
a:focus-visible .arrow.up {
  transform: translate(0.15em, -0.15em);
}

/* ---------- Outline-Marke im Hintergrund ---------- */

.mark {
  position: fixed;
  z-index: -1;
  inset: var(--head) 0 0 0;
  overflow: hidden;
  pointer-events: none;
  user-select: none;
}
.mark span {
  display: block;
  margin-top: 2vh;
  font-family: var(--f);
  font-weight: 500;
  font-size: var(--mark-size, 60vw);
  line-height: 0.8;
  letter-spacing: -0.02em;
  color: transparent;
  -webkit-text-stroke: 1px var(--ink);
  white-space: nowrap;
  animation: drift 40s linear infinite alternate-reverse;
  transition: opacity 0.6s var(--ease);
}
.mark.is-swapping span {
  opacity: 0;
}
@keyframes drift {
  from {
    transform: translateX(-35vw);
  }
  to {
    transform: translateX(5vw);
  }
}

/* ---------- Kopfzeile ---------- */

.site-head {
  position: sticky;
  top: 0;
  z-index: 20;
  display: grid;
  grid-template-columns: auto 1fr;
  min-height: var(--head);
  background: var(--paper);
  border-bottom: var(--line);
}
.logo {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 var(--gutter);
  min-height: var(--head);
  text-decoration: none;
  text-transform: uppercase;
  font-weight: 500;
  font-size: 1.125rem;
  line-height: 1;
  letter-spacing: 0.01em;
  border-right: var(--line);
}
.logo svg {
  width: 30px;
  height: 30px;
  flex: none;
}
.nav {
  display: flex;
  justify-content: flex-end;
}
.nav ul {
  display: flex;
  margin: 0;
  padding: 0;
  list-style: none;
}
.nav a {
  display: flex;
  align-items: center;
  gap: 0.35em;
  height: 100%;
  min-height: 44px;
  padding: 0 var(--gutter);
  font-size: 1.375rem;
  text-transform: uppercase;
  text-decoration: none;
  border-left: var(--line);
  transition: background-color 0.4s var(--ease), color 0.4s var(--ease);
}
.nav a:hover {
  background: var(--ink);
  color: var(--paper);
}
.nav a:focus-visible {
  outline-offset: -4px;
}
.nav a[aria-current="page"] span {
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
}
.menu-btn {
  display: none;
}

@media (max-width: 1150px) {
  .nav a {
    font-size: 1.125rem;
    padding: 0 14px;
  }
}

@media (max-width: 800px) {
  .mark {
    position: absolute;
    inset: var(--head) 0 auto 0;
    height: 52vw;
  }
  :root {
    --head: 56px;
    --fs-body: 1.125rem;
  }
  .site-head {
    grid-template-columns: 1fr auto;
  }
  .logo {
    border-right: 0;
    font-size: 1rem;
  }
  .menu-btn {
    display: grid;
    place-items: center;
    width: var(--head);
    min-height: var(--head);
    padding: 0;
    border: 0;
    border-left: var(--line);
    background: var(--paper);
    color: var(--ink);
    cursor: pointer;
  }
  .menu-btn svg {
    width: 22px;
    height: 22px;
    stroke: currentColor;
    stroke-width: 1.4;
    transition: transform 0.4s var(--ease);
  }
  .menu-btn[aria-expanded="true"] svg {
    transform: rotate(45deg);
  }
  .menu-btn:focus-visible {
    outline-offset: -4px;
  }
  .nav {
    grid-column: 1 / -1;
    border-top: var(--line);
  }
  .js .nav[data-collapsed] {
    display: none;
  }
  .nav ul {
    flex-direction: column;
    width: 100%;
  }
  .nav li + li a {
    border-top: var(--line);
  }
  .nav a {
    min-height: 56px;
    border-left: 0;
    font-size: 1.375rem;
    padding: 0 var(--gutter);
  }
}

/* ---------- Grundgerüst ---------- */

main {
  display: block;
}

.wrap {
  padding: 0 var(--gutter);
}

.page-intro {
  padding: clamp(48px, 9vh, 112px) var(--gutter) clamp(40px, 7vh, 80px);
  border-bottom: var(--line);
}
.page-intro h1 {
  font-size: var(--fs-h1);
  line-height: 0.98;
  text-transform: uppercase;
  letter-spacing: -0.015em;
  max-width: 16ch;
}
.page-intro p {
  margin-top: 28px;
  font-size: var(--fs-lead);
  max-width: 44ch;
}

sup.k {
  white-space: nowrap;
  font-size: 0.26em;
  font-weight: 400;
  letter-spacing: 0.02em;
  vertical-align: top;
  position: relative;
  top: 0.35em;
  margin: 0 0.25em 0 0.15em;
  line-height: 1;
}

.section {
  border-bottom: var(--line);
}
.section-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 20px var(--gutter);
  align-items: end;
  padding: clamp(56px, 10vh, 120px) var(--gutter) 28px;
  border-bottom: var(--line);
}
.section-head h2 {
  font-size: var(--fs-h2);
  line-height: 1;
  text-transform: uppercase;
  letter-spacing: -0.01em;
}
.section-head p {
  margin: 0;
  color: var(--ink);
}
@media (max-width: 800px) {
  .section-head {
    grid-template-columns: 1fr;
  }
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.6em;
  min-height: 48px;
  padding: 10px 18px;
  border: var(--line);
  background: var(--paper);
  color: var(--ink);
  font: inherit;
  font-weight: 500;
  text-transform: uppercase;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.4s var(--ease), color 0.4s var(--ease);
}
.btn:hover {
  background: var(--ink);
  color: var(--paper);
}
.btn.solid {
  background: var(--ink);
  color: var(--paper);
}
.btn.solid:hover {
  background: var(--paper);
  color: var(--ink);
}
.btn.solid:focus-visible {
  outline-color: var(--ink);
}

/* ---------- Startseite: erster Bildschirm ---------- */

.hero {
  display: flex;
  flex-direction: column;
  min-height: calc(100svh - var(--head));
  border-bottom: var(--line);
}
.hero-text {
  flex: 1;
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr);
  gap: 32px var(--gutter);
  align-content: start;
  padding: clamp(36px, 7vh, 88px) var(--gutter) 40px;
}
.hero h1 {
  font-size: var(--fs-h1);
  line-height: 0.98;
  text-transform: uppercase;
  letter-spacing: -0.015em;
}
.hero-lead {
  align-self: end;
  font-size: var(--fs-lead);
  max-width: 34ch;
  margin: 0;
}
.hero-down {
  display: inline-grid;
  place-items: center;
  width: 48px;
  height: 48px;
  margin-top: 20px;
  border: var(--line);
  border-radius: 0;
  transition: background-color 0.4s var(--ease), color 0.4s var(--ease);
}
.hero-down svg {
  width: 22px;
  height: 22px;
  stroke: currentColor;
  stroke-width: 1.4;
  fill: none;
}
.hero-down:hover {
  background: var(--ink);
  color: var(--paper);
}
@media (max-width: 800px) {
  .hero-text {
    grid-template-columns: 1fr;
  }
}

/* Reparaturzettel */

.slip {
  background: var(--paper);
  border-top: var(--line);
}
.slip fieldset {
  margin: 0;
  padding: 0;
  border: 0;
  min-width: 0;
}
.slip-row {
  display: grid;
  grid-template-columns: 200px minmax(0, 1fr);
  border-bottom: var(--line);
}
.slip-row:last-child {
  border-bottom: 0;
}
.slip-label {
  display: flex;
  align-items: center;
  padding: 12px var(--gutter);
  font-size: var(--fs-small);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  border-right: var(--line);
}
.slip-items {
  display: grid;
  grid-template-columns: repeat(8, minmax(0, 1fr));
}
.slip-items label {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 60px;
  padding: 8px;
  font-size: 1.125rem;
  text-transform: uppercase;
  text-align: center;
  cursor: pointer;
  border-left: var(--line);
  transition: background-color 0.4s var(--ease), color 0.4s var(--ease);
}
.slip-items label:first-of-type {
  border-left: 0;
}
.slip-items input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
}
.slip-items label:hover {
  background: #ececec;
}
.slip-items input:checked + label {
  background: var(--ink);
  color: var(--paper);
}
.slip-items input:focus-visible + label {
  outline: 2px solid var(--ink);
  outline-offset: -6px;
}
.slip-items input:checked:focus-visible + label {
  outline-color: var(--paper);
}

.slip-shops {
  display: grid;
  grid-template-columns: repeat(10, minmax(0, 1fr));
  margin: 0;
  padding: 0;
  list-style: none;
}
.slip-shops li {
  border-left: var(--line);
}
.slip-shops li:first-child {
  border-left: 0;
}
.slip-shops a {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 10px;
  height: 100%;
  min-height: 84px;
  padding: 10px 10px 12px;
  text-decoration: none;
  transition: background-color 0.5s var(--ease), color 0.5s var(--ease);
}
.slip-shops .n {
  font-size: 1.5rem;
  font-weight: 500;
  line-height: 1;
}
.slip-shops .t {
  font-size: var(--fs-small);
  text-transform: uppercase;
  letter-spacing: 0.03em;
  overflow-wrap: anywhere;
}
.slip-shops a:hover {
  background: #ececec;
}
.slip-shops a:focus-visible {
  outline-offset: -4px;
}

.slip-route {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
}
.slip-route .out {
  padding: 14px var(--gutter);
  min-height: 72px;
  display: flex;
  align-items: center;
}
.slip-route .out p {
  margin: 0;
  max-width: 80ch;
  font-size: 1.125rem;
}
.slip-route .out .when {
  display: block;
  color: var(--muted);
  font-size: 1rem;
  margin-top: 2px;
}
.slip-route .go {
  border-left: var(--line);
  display: flex;
}
.slip-route .go a {
  display: flex;
  align-items: center;
  gap: 0.6em;
  padding: 0 var(--gutter);
  min-height: 60px;
  font-weight: 500;
  text-transform: uppercase;
  text-decoration: none;
  background: var(--ink);
  color: var(--paper);
  transition: background-color 0.4s var(--ease), color 0.4s var(--ease);
}
.slip-route .go a:hover {
  background: var(--paper);
  color: var(--ink);
}
.slip-route .go a:focus-visible {
  outline-color: var(--ink);
  outline-offset: -5px;
  box-shadow: inset 0 0 0 3px var(--paper);
}

/* Weg-Texte: ohne JS nur der gewählte sichtbar (CSS :has) */
.route {
  display: none;
}
.route[data-for="stuhl"] {
  display: block;
}
.slip:has(input:checked) .route {
  display: none;
}
.slip:has(#g-stuhl:checked) .route[data-for="stuhl"],
.slip:has(#g-sessel:checked) .route[data-for="sessel"],
.slip:has(#g-fenster:checked) .route[data-for="fenster"],
.slip:has(#g-messer:checked) .route[data-for="messer"],
.slip:has(#g-buch:checked) .route[data-for="buch"],
.slip:has(#g-geschirr:checked) .route[data-for="geschirr"],
.slip:has(#g-uhr:checked) .route[data-for="uhr"],
.slip:has(#g-tor:checked) .route[data-for="tor"] {
  display: block;
}

/* Zuständige Werkstätten schalten schwarz */
.slip:has(#g-stuhl:checked) :is([data-n="01"], [data-n="05"], [data-n="10"]) a,
.slip:has(#g-sessel:checked) :is([data-n="01"], [data-n="02"]) a,
.slip:has(#g-fenster:checked) :is([data-n="01"], [data-n="03"], [data-n="04"]) a,
.slip:has(#g-messer:checked) :is([data-n="08"], [data-n="05"]) a,
.slip:has(#g-buch:checked) [data-n="06"] a,
.slip:has(#g-geschirr:checked) [data-n="07"] a,
.slip:has(#g-uhr:checked) :is([data-n="09"], [data-n="01"]) a,
.slip:has(#g-tor:checked) :is([data-n="04"], [data-n="01"]) a {
  background: var(--ink);
  color: var(--paper);
}
.slip:has(#g-stuhl:checked) :is([data-n="01"], [data-n="05"], [data-n="10"]) a:focus-visible,
.slip:has(#g-sessel:checked) :is([data-n="01"], [data-n="02"]) a:focus-visible,
.slip:has(#g-fenster:checked) :is([data-n="01"], [data-n="03"], [data-n="04"]) a:focus-visible,
.slip:has(#g-messer:checked) :is([data-n="08"], [data-n="05"]) a:focus-visible,
.slip:has(#g-buch:checked) [data-n="06"] a:focus-visible,
.slip:has(#g-geschirr:checked) [data-n="07"] a:focus-visible,
.slip:has(#g-uhr:checked) :is([data-n="09"], [data-n="01"]) a:focus-visible,
.slip:has(#g-tor:checked) :is([data-n="04"], [data-n="01"]) a:focus-visible {
  outline-color: var(--paper);
}

@media (max-width: 1150px) {
  .slip-row {
    grid-template-columns: 150px minmax(0, 1fr);
  }
  .slip-items label {
    font-size: 1rem;
  }
}
@media (max-width: 800px) {
  .slip-row {
    grid-template-columns: 1fr;
  }
  .slip-label {
    border-right: 0;
    border-bottom: var(--line);
    min-height: 40px;
  }
  .slip-items {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
  .slip-items label {
    min-height: 52px;
    border-left: var(--line);
    font-size: 0.9375rem;
  }
  .slip-items label:nth-of-type(4n + 1) {
    border-left: 0;
  }
  .slip-items label:nth-of-type(n + 5) {
    border-top: var(--line);
  }
  .slip-shops {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .slip-shops li:nth-child(odd) {
    border-left: 0;
  }
  .slip-shops li:nth-child(n + 3) {
    border-top: var(--line);
  }
  .slip-shops a {
    flex-direction: row;
    align-items: center;
    justify-content: flex-start;
    gap: 10px;
    min-height: 48px;
    padding: 6px 12px;
  }
  .slip-shops .n {
    font-size: 1.125rem;
  }
  .slip-shops .t {
    font-size: 0.8125rem;
    letter-spacing: 0.02em;
    overflow-wrap: normal;
  }
  .slip-route {
    grid-template-columns: 1fr;
  }
  .slip-route .go {
    border-left: 0;
    border-top: var(--line);
  }
  .slip-route .go a {
    flex: 1;
    justify-content: space-between;
  }
}
@media (max-width: 420px) {
  .slip-items label {
    font-size: 0.8125rem;
    padding: 6px 4px;
  }
}

/* ---------- Register (Spalten-Akkordeon) ---------- */

.register {
  background: var(--paper);
  display: flex;
  height: max(600px, calc(100vh - var(--head)));
  margin: 0;
  padding: 0;
  list-style: none;
  border-bottom: var(--line);
}
.reg-col {
  position: relative;
  flex: 1 1 0;
  min-width: 0;
  border-left: var(--line);
  overflow: hidden;
  transition: flex-grow 0.6s var(--ease);
}
.reg-col:first-child {
  border-left: 0;
}
.reg-col.is-open {
  flex-grow: 21;
}
.reg-tab {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  padding: 18px 0 22px;
  border: 0;
  background: var(--paper);
  color: var(--ink);
  font: inherit;
  cursor: pointer;
  transition: background-color 0.5s var(--ease), color 0.5s var(--ease), opacity 0.3s var(--ease);
}
.reg-tab:hover,
.reg-tab:focus-visible {
  background: var(--ink);
  color: var(--paper);
}
.reg-tab:focus-visible {
  outline: 2px solid var(--paper);
  outline-offset: -6px;
}
.reg-tab .n {
  font-size: clamp(1rem, 1.4vw, 1.375rem);
  font-weight: 500;
}
.reg-tab .v {
  writing-mode: vertical-lr;
  transform: rotate(180deg);
  font-size: clamp(1.5rem, 2.6vw, 2.75rem);
  font-weight: 500;
  line-height: 1;
  text-transform: uppercase;
  letter-spacing: 0.01em;
  white-space: nowrap;
}
.reg-col.is-open .reg-tab {
  opacity: 0;
  pointer-events: none;
}

.reg-panel {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-rows: auto 1fr auto;
  width: 70vw;
  min-width: 560px;
  padding: 18px 28px 28px;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.4s var(--ease), visibility 0s linear 0.4s;
}
.reg-col.is-open .reg-panel {
  opacity: 1;
  visibility: visible;
  transition: opacity 0.5s var(--ease) 0.2s, visibility 0s;
}
.reg-panel header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 20px;
}
.reg-panel h3 {
  font-size: clamp(2rem, 4.5vw, 4.5rem);
  line-height: 0.95;
  text-transform: uppercase;
  letter-spacing: -0.015em;
}
.reg-panel .who {
  margin: 10px 0 0;
  color: var(--muted);
}
.reg-panel .big-n {
  font-size: clamp(6rem, 17vw, 16rem);
  font-weight: 500;
  line-height: 0.8;
  color: transparent;
  -webkit-text-stroke: 1px var(--ink);
  letter-spacing: -0.03em;
}
.reg-panel .facts {
  align-self: end;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin: 0 0 22px;
  border-top: var(--line);
}
.reg-panel .facts div {
  padding: 12px 16px 0 0;
}
.reg-panel .facts div + div {
  padding-left: 16px;
  border-left: var(--line);
}
.reg-panel dt {
  font-size: var(--fs-small);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 6px;
}
.reg-panel dd {
  margin: 0;
  font-size: 1.0625rem;
}
.reg-panel .actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}
.reg-close {
  min-width: 48px;
}

/* Ohne JS und auf dem Handy: Register als Zeilenliste */
html:not(.js) .register,
.register.as-list {
  display: block;
  height: auto;
}
html:not(.js) .reg-col,
.register.as-list .reg-col {
  border-left: 0;
  border-top: var(--line);
  overflow: visible;
}
html:not(.js) .reg-col:first-child,
.register.as-list .reg-col:first-child {
  border-top: 0;
}
html:not(.js) .reg-tab,
.register.as-list .reg-tab {
  position: relative;
  inset: auto;
  flex-direction: row-reverse;
  justify-content: space-between;
  align-items: center;
  min-height: 64px;
  padding: 12px var(--gutter);
  text-align: left;
}
html:not(.js) .reg-tab .v,
.register.as-list .reg-tab .v {
  writing-mode: horizontal-tb;
  transform: none;
  font-size: clamp(1.375rem, 5.5vw, 2rem);
  white-space: normal;
}
.register.as-list .reg-col.is-open .reg-tab {
  opacity: 1;
  pointer-events: auto;
  background: var(--ink);
  color: var(--paper);
}
html:not(.js) .reg-panel,
.register.as-list .reg-panel {
  position: static;
  width: auto;
  min-width: 0;
  padding: 20px var(--gutter) 24px;
  opacity: 1;
  visibility: visible;
  display: block;
}
.register.as-list .reg-col:not(.is-open) .reg-panel {
  display: none;
}
html:not(.js) .reg-panel header,
.register.as-list .reg-panel header {
  display: block;
}
html:not(.js) .reg-panel .big-n,
.register.as-list .reg-panel .big-n,
html:not(.js) .reg-close,
.register.as-list .reg-close {
  display: none;
}
html:not(.js) .reg-panel h3 {
  font-size: 1.75rem;
}
.register.as-list .reg-panel h3 {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}
.register.as-list .reg-panel .who {
  margin-top: 0;
}
html:not(.js) .reg-panel .facts,
.register.as-list .reg-panel .facts {
  grid-template-columns: 1fr;
  margin-top: 20px;
}
html:not(.js) .reg-panel .facts div,
.register.as-list .reg-panel .facts div {
  padding: 12px 0;
  border-left: 0;
  border-bottom: 1px solid var(--hair);
}
html:not(.js) .reg-panel .facts div + div,
.register.as-list .reg-panel .facts div + div {
  padding-left: 0;
}

/* ---------- Tabellen / Raster ---------- */

.grid-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 1.125rem;
}
.grid-table caption {
  text-align: left;
  padding: 0 var(--gutter) 12px;
  color: var(--muted);
  font-size: 1rem;
}
.grid-table th,
.grid-table td {
  padding: 16px var(--gutter);
  text-align: left;
  vertical-align: top;
  border-top: var(--line);
}
.grid-table th + th,
.grid-table td + td,
.grid-table th + td {
  border-left: var(--line);
}
.grid-table thead th {
  font-size: var(--fs-small);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding-top: 12px;
  padding-bottom: 12px;
}
.grid-table tbody th {
  font-weight: 500;
}
.grid-table .num {
  white-space: nowrap;
}
.grid-table tr.full td {
  color: var(--muted);
}
.grid-table .tag {
  display: inline-block;
  padding: 2px 8px;
  border: var(--line);
  font-size: var(--fs-small);
  text-transform: uppercase;
  letter-spacing: 0.03em;
  white-space: nowrap;
}
.grid-table .tag.inv {
  background: var(--ink);
  color: var(--paper);
}
@media (max-width: 800px) {
  .grid-table.stack thead {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
  }
  .grid-table.stack,
  .grid-table.stack tbody,
  .grid-table.stack tr,
  .grid-table.stack th,
  .grid-table.stack td {
    display: block;
  }
  .grid-table.stack tr {
    border-top: var(--line);
    padding: 14px var(--gutter) 16px;
  }
  .grid-table.stack th,
  .grid-table.stack td {
    border: 0;
    padding: 2px 0;
  }
  .grid-table.stack td[data-l]::before {
    content: attr(data-l) " · ";
    font-size: var(--fs-small);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.04em;
  }
  .grid-table.stack th + td,
  .grid-table.stack td + td {
    border-left: 0;
  }
}

/* Zweispaltige Text-Zeilen mit Linie */
.rows {
  margin: 0;
  padding: 0;
  list-style: none;
}
.rows > li,
.row {
  display: grid;
  grid-template-columns: minmax(140px, 1fr) minmax(0, 3fr);
  gap: 8px var(--gutter);
  padding: 22px var(--gutter);
  border-top: var(--line);
}
.rows > li:first-child {
  border-top: 0;
}
.rows h3,
.row h3 {
  font-size: 1.375rem;
  text-transform: uppercase;
  line-height: 1.1;
}
.rows p:last-child,
.row p:last-child {
  margin-bottom: 0;
}
@media (max-width: 800px) {
  .rows > li,
  .row {
    grid-template-columns: 1fr;
  }
}

/* Teaser-Zeilen der Startseite */
.teaser-list {
  margin: 0;
  padding: 0;
  list-style: none;
}
.teaser-list a {
  display: grid;
  grid-template-columns: 180px minmax(0, 1fr) minmax(0, 0.8fr) 48px;
  gap: 8px var(--gutter);
  align-items: baseline;
  padding: 22px var(--gutter);
  border-top: var(--line);
  text-decoration: none;
  transition: background-color 0.4s var(--ease), color 0.4s var(--ease);
}
.teaser-list li:first-child a {
  border-top: 0;
}
.teaser-list a:hover {
  background: var(--ink);
  color: var(--paper);
}
.teaser-list a:focus-visible {
  outline-offset: -4px;
}
.teaser-list .d {
  font-weight: 500;
  text-transform: uppercase;
}
.teaser-list .ti {
  font-size: clamp(1.25rem, 1rem + 1vw, 1.875rem);
  font-weight: 500;
  text-transform: uppercase;
  line-height: 1.1;
}
.teaser-list .ar {
  justify-self: end;
}
.teaser-list .ar svg {
  width: 26px;
  height: 26px;
  stroke: currentColor;
  stroke-width: 1.4;
  fill: none;
}
@media (max-width: 800px) {
  .teaser-list a {
    grid-template-columns: 1fr 32px;
  }
  .teaser-list a > :not(.ar) {
    grid-column: 1;
  }
  .teaser-list .ar {
    grid-column: 2;
    grid-row: 1;
  }
}

/* Zitat-Absatz / Hof-Band */
.band {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  border-bottom: var(--line);
}
.band > * {
  padding: clamp(32px, 6vh, 64px) var(--gutter);
}
.band > * + * {
  border-left: var(--line);
}
.band .big {
  font-size: clamp(1.5rem, 1rem + 2vw, 2.75rem);
  font-weight: 500;
  line-height: 1.1;
  text-transform: uppercase;
  max-width: 20ch;
  margin: 0;
}
@media (max-width: 800px) {
  .band {
    grid-template-columns: 1fr;
  }
  .band > * + * {
    border-left: 0;
    border-top: var(--line);
  }
}

/* Lageplan */
.plan {
  border-bottom: var(--line);
  padding: 0;
}
.plan figure {
  margin: 0;
}
.plan svg {
  width: 100%;
  height: auto;
}
.plan figcaption {
  padding: 14px var(--gutter);
  border-top: var(--line);
  color: var(--muted);
  font-size: 1rem;
}
.plan .bldg {
  fill: var(--paper);
  stroke: var(--ink);
  stroke-width: 1;
  transition: fill 0.4s var(--ease);
}
.plan a:hover .bldg,
.plan a:focus-visible .bldg {
  fill: var(--ink);
}
.plan a:hover text,
.plan a:focus-visible text {
  fill: var(--paper);
}
.plan a:focus-visible {
  outline: none;
}
.plan text {
  font-family: var(--f);
  font-size: 15px;
  font-weight: 500;
  fill: var(--ink);
  text-transform: uppercase;
  transition: fill 0.4s var(--ease);
}
.plan text.s {
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 0.04em;
}
.plan .ground {
  fill: none;
  stroke: var(--ink);
  stroke-width: 1;
}
.plan .hatch {
  stroke: var(--hair);
  stroke-width: 1;
}

/* Formular (Demo) */
.form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  border-top: var(--line);
}
.field {
  display: flex;
  flex-direction: column;
  padding: 14px var(--gutter) 16px;
  border-bottom: var(--line);
}
.field:nth-child(odd) {
  border-right: var(--line);
}
.field.wide {
  grid-column: 1 / -1;
  border-right: 0;
}
.field label,
.field legend {
  font-size: var(--fs-small);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 8px;
  padding: 0;
}
.field input,
.field select,
.field textarea {
  width: 100%;
  min-height: 48px;
  padding: 10px 12px;
  border: var(--line);
  border-radius: 0;
  background: var(--paper);
  color: var(--ink);
  font: inherit;
  font-size: 1.125rem;
  caret-color: var(--ink);
}
.field textarea {
  min-height: 120px;
  resize: vertical;
}
.field input::placeholder,
.field textarea::placeholder {
  color: var(--muted);
  opacity: 1;
}
.field input:focus-visible,
.field select:focus-visible,
.field textarea:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 2px;
}
.field .hint {
  margin: 8px 0 0;
  font-size: 1rem;
  color: var(--muted);
}
.field .err {
  margin: 8px 0 0;
  font-size: 1rem;
  font-weight: 500;
}
.field [aria-invalid="true"] {
  border-width: 2px;
}
.checks {
  display: flex;
  flex-wrap: wrap;
  gap: 0;
  border: 0;
  margin: 0;
  padding: 0;
}
.checks label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 16px 0 0;
  font-size: 1.0625rem;
  text-transform: none;
  letter-spacing: 0;
  font-weight: 400;
  margin: 0;
  cursor: pointer;
}
.checks input {
  width: 20px;
  height: 20px;
  min-height: 0;
  accent-color: var(--ink);
}
.form-foot {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px var(--gutter);
}
.form-foot p {
  margin: 0;
  color: var(--muted);
  font-size: 1rem;
}
.form-status {
  grid-column: 1 / -1;
  padding: 0 var(--gutter);
}
.form-status:not(:empty) {
  padding: 16px var(--gutter);
  border-bottom: var(--line);
  background: var(--ink);
  color: var(--paper);
}
@media (max-width: 800px) {
  .form {
    grid-template-columns: 1fr;
  }
  .field:nth-child(odd) {
    border-right: 0;
  }
}

/* FAQ */
.faq details {
  border-top: var(--line);
}
.faq details:first-child {
  border-top: 0;
}
.faq summary {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  min-height: 64px;
  padding: 14px var(--gutter);
  font-size: 1.25rem;
  font-weight: 500;
  text-transform: uppercase;
  cursor: pointer;
  list-style: none;
  transition: background-color 0.4s var(--ease), color 0.4s var(--ease);
}
.faq summary::-webkit-details-marker {
  display: none;
}
.faq summary svg {
  flex: none;
  width: 20px;
  height: 20px;
  stroke: currentColor;
  stroke-width: 1.4;
  transition: transform 0.4s var(--ease);
}
.faq details[open] summary svg {
  transform: rotate(45deg);
}
.faq summary:hover {
  background: var(--ink);
  color: var(--paper);
}
.faq summary:focus-visible {
  outline-offset: -4px;
}
.faq .a {
  padding: 4px var(--gutter) 22px;
}

/* Rechtstexte */
.legal {
  padding: 40px var(--gutter) 72px;
}
.legal h2 {
  font-size: 1.375rem;
  text-transform: uppercase;
  margin: 40px 0 12px;
  padding-top: 14px;
  border-top: var(--line);
  max-width: 62ch;
}
.legal h2:first-child {
  margin-top: 0;
}
.demo-note {
  display: inline-block;
  margin: 0 0 24px;
  padding: 8px 12px;
  border: var(--line);
  font-size: 1rem;
  font-weight: 500;
}

/* ---------- Werkstätten-Seite ---------- */

.strip {
  border-bottom: var(--line);
}
.strip .slip-shops a[aria-current="true"],
.strip .slip-shops a:active {
  background: var(--ink);
  color: var(--paper);
}
.ws {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 2fr);
  border-bottom: var(--line);
  scroll-margin-top: var(--head);
}
.ws-n {
  padding: 28px var(--gutter);
  border-right: var(--line);
  font-size: clamp(5rem, 15vw, 14rem);
  font-weight: 500;
  line-height: 0.8;
  letter-spacing: -0.03em;
  color: transparent;
  -webkit-text-stroke: 1px var(--ink);
}
.ws-body {
  padding: 28px var(--gutter) 36px;
}
.ws-body h2 {
  font-size: var(--fs-h2);
  line-height: 1;
  text-transform: uppercase;
  letter-spacing: -0.01em;
}
.ws-body .who {
  margin: 10px 0 22px;
  color: var(--muted);
}
.ws-facts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin: 28px 0 0;
  border-top: var(--line);
}
.ws-facts div {
  padding: 12px 16px 12px 0;
  border-bottom: 1px solid var(--hair);
}
.ws-facts div:nth-child(even) {
  padding-left: 16px;
  border-left: var(--line);
}
.ws-facts div:first-child {
  grid-column: 1 / -1;
}
.ws-facts div:first-child ~ div:nth-child(even) {
  padding-left: 0;
  border-left: 0;
}
.ws-facts div:first-child ~ div:nth-child(odd) {
  padding-left: 16px;
  border-left: var(--line);
}
.ws-facts dt {
  font-size: var(--fs-small);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 4px;
}
.ws-facts dd {
  margin: 0;
  font-size: 1.125rem;
}
@media (max-width: 800px) {
  .ws {
    grid-template-columns: 1fr;
  }
  .ws-n {
    border-right: 0;
    border-bottom: 1px solid var(--hair);
    padding-bottom: 18px;
    font-size: 6.5rem;
  }
  .ws-facts {
    grid-template-columns: 1fr;
  }
  .ws-facts div:first-child ~ div:nth-child(odd) {
    padding-left: 0;
    border-left: 0;
  }
}

/* ---------- Annahme: Tafel ---------- */

.matrix th:first-child {
  width: 40%;
}
.matrix thead th:not(:first-child) {
  text-align: center;
}
.matrix td {
  padding: 0;
  height: 56px;
}
.matrix td.on {
  background: var(--ink);
}
.matrix .mn {
  display: inline-block;
  min-width: 2.2ch;
  margin-right: 0.5em;
}
.matrix tbody tr:hover th {
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
}
@media (max-width: 640px) {
  .matrix th,
  .matrix td {
    font-size: 0.9375rem;
  }
  .matrix th:first-child {
    width: auto;
    padding-left: var(--gutter);
    padding-right: 8px;
  }
  .matrix thead th:not(:first-child) {
    padding-left: 0;
    padding-right: 0;
    width: 13%;
  }
}

.steps {
  counter-reset: step;
}
.steps li {
  counter-increment: step;
}
.steps h3::before {
  content: counter(step, decimal-leading-zero) " ";
  font-weight: 400;
}

/* ---------- Hof: Plan ---------- */

.plan figure {
  padding: 24px var(--gutter) 0;
}
.plan svg {
  max-width: 1400px;
  margin: 0 auto 20px;
}
.plan text.n {
  font-size: 30px;
}
.plan figcaption {
  margin: 0 calc(-1 * var(--gutter));
}
.plan-legend {
  display: none;
}
@media (max-width: 640px) {
  .plan text.s {
    display: none;
  }
  .plan text.n {
    font-size: 40px;
  }
  .plan-legend {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin: 0;
    padding: 0;
    list-style: none;
    border-top: var(--line);
  }
  .plan-legend li {
    border-bottom: 1px solid var(--hair);
  }
  .plan-legend li:nth-child(odd) {
    border-right: var(--line);
  }
  .plan-legend a {
    display: flex;
    align-items: center;
    gap: 8px;
    min-height: 48px;
    padding: 0 var(--gutter);
    text-decoration: none;
    text-transform: uppercase;
    font-size: 0.9375rem;
  }
  .plan-legend .n {
    font-weight: 500;
  }
}

/* ---------- Footer (Linienraster) ---------- */

.site-foot {
  background: var(--paper);
  font-size: 0.9375rem;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  line-height: 1.45;
}
.foot-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border-bottom: var(--line);
}
.foot-grid > div {
  padding: 20px var(--gutter) 24px;
  border-left: var(--line);
}
.foot-grid > div:first-child {
  border-left: 0;
}
.foot-grid h2 {
  font-size: var(--fs-small);
  font-weight: 500;
  letter-spacing: 0.04em;
  margin-bottom: 10px;
}
.foot-grid p {
  margin: 0;
}
.foot-grid a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
}
.foot-logo {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 24px;
}
.foot-logo svg {
  width: 56px;
  height: 56px;
}
.foot-base {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px var(--gutter);
  align-items: center;
}
.foot-base p {
  text-transform: none;
  letter-spacing: 0;
  margin: 0;
  padding: 12px var(--gutter);
  max-width: none;
}
.foot-base ul {
  display: flex;
  margin: 0;
  padding: 0;
  list-style: none;
}
.foot-base li a {
  display: flex;
  align-items: center;
  min-height: 48px;
  padding: 0 var(--gutter);
  border-left: var(--line);
  text-decoration: none;
}
.foot-base li a:hover {
  background: var(--ink);
  color: var(--paper);
}
.foot-base li a:focus-visible {
  outline-offset: -4px;
}
@media (max-width: 1150px) {
  .foot-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .foot-grid > div:nth-child(3) {
    border-left: 0;
  }
  .foot-grid > div:nth-child(n + 3) {
    border-top: var(--line);
  }
}
@media (max-width: 640px) {
  .foot-grid {
    grid-template-columns: 1fr;
  }
  .foot-grid > div {
    border-left: 0;
  }
  .foot-grid > div + div {
    border-top: var(--line);
  }
  .foot-base {
    grid-template-columns: 1fr;
  }
  .foot-base ul {
    border-top: var(--line);
  }
  .foot-base li:first-child a {
    border-left: 0;
  }
}

/* ---------- Bewegung reduzieren ---------- */

@media (prefers-reduced-motion: reduce) {
  .mark span {
    animation: none;
    transform: translateX(-4vw);
  }
  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
    transition-delay: 0s !important;
    scroll-behavior: auto !important;
  }
}

/* Flächen, auf denen die Outline-Marke stören würde */
.matrix-wrap,
.plan figure,
.plan-legend,
.form,
.ws,
.strip,
.grid-table,
.rows,
.teaser-list,
.faq > div {
  background: var(--paper);
}
fieldset.field {
  margin: 0;
  min-width: 0;
  border: 0;
  border-bottom: var(--line);
}
