/* ==========================================================================
   Komponenten
   ========================================================================== */

/* --- Buttons ----------------------------------------------------------- */
.btn {
  --btn-bg: var(--color-brand-primary);
  --btn-fg: var(--color-surface-alt);
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.7rem;
  min-height: 52px;
  padding: 0.9rem 1.6rem;
  border: 1px solid transparent;
  border-radius: var(--radius-md);
  background: var(--btn-bg);
  color: var(--btn-fg);
  font-family: inherit;
  font-size: 0.94rem;
  font-weight: 600;
  letter-spacing: -0.005em;
  cursor: pointer;
  overflow: hidden;
  isolation: isolate;
  transition: color var(--transition-normal), border-color var(--transition-normal),
              transform var(--transition-fast), box-shadow var(--transition-normal);
}
/* Farbfläche „wird aufgetragen“ */
.btn::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: var(--color-accent);
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform var(--transition-slow);
}
.btn:hover::before, .btn:focus-visible::before { transform: scaleX(1); }
.btn:hover { color: var(--color-brand-primary); }
.btn:active { transform: translateY(1px); }
.btn__arrow { transition: transform var(--transition-normal); flex: none; }
.btn:hover .btn__arrow { transform: translateX(4px); }

.btn--outline {
  --btn-bg: transparent;
  --btn-fg: var(--color-brand-primary);
  border-color: var(--color-border-strong);
}
.btn--outline:hover { border-color: var(--color-accent); }

.btn--light { --btn-bg: var(--color-surface-alt); --btn-fg: var(--color-brand-primary); }
.btn--gold  { --btn-bg: var(--color-accent); --btn-fg: var(--color-brand-primary); }
.btn--gold::before { background: var(--color-brand-primary); }
.btn--gold:hover { color: var(--color-accent); }
.btn--sm { min-height: 42px; padding: 0.5rem 1.05rem; font-size: 0.84rem; white-space: nowrap; }
.btn--block { width: 100%; }

.btn-row { display: flex; flex-wrap: wrap; gap: 0.75rem; }

/* Textlink mit Pfeil ----------------------------------------------------- */
.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 600;
  font-size: 0.94rem;
  color: var(--color-brand-primary);
  padding-bottom: 3px;
  background-image: linear-gradient(var(--color-accent), var(--color-accent));
  background-repeat: no-repeat;
  background-size: 0% 2px;
  background-position: left bottom;
  transition: background-size var(--transition-normal);
}
.link-arrow:hover { background-size: 100% 2px; }
.link-arrow svg { transition: transform var(--transition-normal); }
.link-arrow:hover svg { transform: translateX(4px); }
.on-dark .link-arrow { color: var(--color-text-invert); }

/* --- Vertrauensleiste --------------------------------------------------- */
.trustbar { border-block: 1px solid var(--color-border); background: var(--color-surface); }
.trustbar__list {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  list-style: none;
  margin: 0;
  padding: 0;
}
.trustbar__item {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 1.35rem clamp(0.75rem, 1.6vw, 1.5rem);
  margin: 0;
  border-right: 1px solid var(--color-border);
}
.trustbar__item:last-child { border-right: 0; }
.trustbar__icon {
  width: 26px; height: 26px; flex: none;
  stroke: var(--color-accent-deep);
  fill: none;
  stroke-width: 1.5;
}
.trustbar__text { font-size: 0.86rem; line-height: 1.3; font-weight: 500; }
.trustbar__text span { display: block; font-weight: 400; color: var(--color-muted); font-size: 0.78rem; }

/* --- Leistungskarten ---------------------------------------------------- */
.services-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: clamp(0.9rem, 1.6vw, 1.4rem);
}
.service-card {
  --card-span: 2;
  grid-column: span var(--card-span);
  position: relative;
  display: flex;
  flex-direction: column;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transform-style: preserve-3d;
  transition: transform var(--transition-normal), box-shadow var(--transition-normal),
              border-color var(--transition-normal);
  will-change: transform;
}
.service-card--wide { --card-span: 3; }
.service-card--full { --card-span: 6; flex-direction: row; align-items: stretch; }
.service-card:hover { box-shadow: var(--shadow-md); border-color: var(--color-border-strong); }
.service-card__media {
  position: relative;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: var(--color-surface-alt-2);
}
.service-card--full .service-card__media { aspect-ratio: auto; flex: 1 1 46%; min-height: 260px; }
.service-card__media img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform var(--transition-slow), filter var(--transition-slow);
}
.service-card:hover .service-card__media img { transform: scale(1.045); }
.service-card__num {
  position: absolute;
  top: 0.9rem; left: 0.9rem;
  z-index: 2;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.14em;
  color: var(--color-brand-primary);
  background: var(--color-accent);
  padding: 0.3rem 0.55rem;
  border-radius: var(--radius-sm);
}
.service-card__body {
  padding: clamp(1.15rem, 2vw, 1.6rem);
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  flex: 1;
}
.service-card--full .service-card__body { justify-content: center; flex: 1 1 54%; padding: clamp(1.5rem, 3vw, 3rem); }
.service-card__title { font-size: 1.15rem; }
.service-card--full .service-card__title { font-size: var(--fs-h3); }
.service-card__text { font-size: 0.92rem; color: var(--color-muted); margin: 0; }
.service-card__more { margin-top: auto; padding-top: 0.9rem; }
.service-card__link::after { content: ""; position: absolute; inset: 0; }

/* --- Farbkarten (3D) ---------------------------------------------------- */
.swatch-stack {
  display: flex;
  justify-content: center;
  align-items: flex-end;
  gap: clamp(0.5rem, 1.4vw, 1.2rem);
  perspective: 1400px;
  padding-block: 1.5rem 2.5rem;
}
.swatch {
  position: relative;
  width: clamp(112px, 13.5vw, 196px);
  aspect-ratio: 3 / 4.9;
  border-radius: 6px;
  background: var(--swatch);
  box-shadow: var(--shadow-md);
  transform: rotate(var(--rot, 0deg)) translateY(var(--ty, 0));
  transform-style: preserve-3d;
  transition: transform var(--transition-slow), box-shadow var(--transition-slow);
  cursor: default;
  overflow: hidden;
  border: 1px solid rgba(0, 0, 0, 0.06);
}
.swatch::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(150deg, rgba(255,255,255,0.4), rgba(255,255,255,0) 42%,
                              rgba(0,0,0,0.12));
  opacity: 0.85;
  transition: opacity var(--transition-slow);
}
.swatch:hover, .swatch:focus-within {
  transform: rotate(0deg) translateY(-18px) rotateX(6deg) scale(1.05);
  box-shadow: var(--shadow-lg);
  z-index: 3;
}
.swatch:hover::after { opacity: 0.45; }
.swatch__label {
  position: absolute;
  inset: auto 0 0 0;
  z-index: 2;
  padding: 0.9rem 0.8rem;
  background: linear-gradient(transparent, rgba(14, 14, 17, 0.55));
  color: #fff;
  font-size: 0.86rem;
  font-weight: 600;
  letter-spacing: 0.02em;
}
.swatch__label span {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  opacity: 0.75;
  font-weight: 400;
  margin-top: 2px;
}

/* --- Projektkarten ------------------------------------------------------ */
.project-grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  grid-auto-flow: dense;
  gap: clamp(0.9rem, 1.8vw, 1.6rem);
}
.project-card {
  position: relative;
  grid-column: span 4;
  display: block;
  overflow: hidden;
  border-radius: var(--radius-lg);
  background: var(--color-surface-alt-2);
  cursor: zoom-in;
  border: 0;
  padding: 0;
  width: 100%;
  text-align: left;
  font: inherit;
  color: inherit;
}
.project-card--tall { grid-column: span 4; }
.project-card--wide { grid-column: span 8; }
.project-card--half { grid-column: span 6; }
.project-card { display: flex; }
.project-card__media { position: relative; overflow: hidden; width: 100%; }
.project-card__media img {
  width: 100%;
  height: 100%;
  min-height: 100%;
  aspect-ratio: var(--ratio, 4 / 3);
  object-fit: cover;
  transition: transform var(--transition-slow);
}
.project-card:hover .project-card__media img { transform: scale(1.04); }
.project-card__overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: clamp(1rem, 2vw, 1.6rem);
  background: linear-gradient(to top, rgba(14, 14, 17, 0.78) 0%,
              rgba(14, 14, 17, 0.28) 42%, rgba(14, 14, 17, 0) 72%);
  opacity: 0;
  transition: opacity var(--transition-normal);
}
.project-card:hover .project-card__overlay,
.project-card:focus-visible .project-card__overlay { opacity: 1; }
.project-card__cat {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--color-accent);
  margin-bottom: 0.35rem;
}
.project-card__title { color: #fff; font-size: 1.05rem; font-weight: 600; letter-spacing: -0.015em; }
.project-card__bar {
  position: absolute;
  left: 0; bottom: 0;
  height: 4px; width: 100%;
  background: var(--color-accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--transition-slow);
}
.project-card:hover .project-card__bar { transform: scaleX(1); }

/* Filter ---------------------------------------------------------------- */
.filterbar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: var(--space-lg);
}
.filter-btn {
  border: 1px solid var(--color-border);
  background: var(--color-surface);
  border-radius: var(--radius-pill);
  padding: 0.55rem 1.05rem;
  font: inherit;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--color-text);
  cursor: pointer;
  min-height: 44px;
  transition: background var(--transition-fast), color var(--transition-fast),
              border-color var(--transition-fast);
}
.filter-btn:hover { border-color: var(--color-border-strong); }
.filter-btn[aria-pressed="true"] {
  background: var(--color-brand-primary);
  border-color: var(--color-brand-primary);
  color: var(--color-surface-alt);
}

/* --- Vorher/Nachher ----------------------------------------------------- */
.ba {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--color-surface-alt-2);
  box-shadow: var(--shadow-sm);
  touch-action: pan-y;
}
.ba__frame { position: relative; aspect-ratio: 4 / 5; }
.ba__img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.ba__clip {
  position: absolute;
  inset: 0;
  clip-path: inset(0 calc(100% - var(--pos, 50%)) 0 0);
  will-change: clip-path;
}
.ba__handle {
  position: absolute;
  top: 0; bottom: 0;
  left: var(--pos, 50%);
  width: 2px;
  background: var(--color-accent);
  transform: translateX(-1px);
  cursor: ew-resize;
  border: 0;
  padding: 0;
}
.ba__handle::after {
  content: "";
  position: absolute;
  left: 50%; top: 50%;
  width: 46px; height: 46px;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: var(--color-accent);
  box-shadow: 0 6px 18px rgba(14, 14, 17, 0.32);
}
.ba__handle::before {
  content: "";
  position: absolute;
  left: 50%; top: 50%;
  z-index: 2;
  width: 18px; height: 10px;
  transform: translate(-50%, -50%);
  background:
    linear-gradient(var(--color-brand-primary), var(--color-brand-primary)) left center / 5px 10px no-repeat,
    linear-gradient(var(--color-brand-primary), var(--color-brand-primary)) right center / 5px 10px no-repeat;
  clip-path: polygon(0 50%, 45% 0, 45% 100%, 55% 0, 100% 50%, 55% 100%);
}
.ba__tag {
  position: absolute;
  top: 0.85rem;
  z-index: 3;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  padding: 0.35rem 0.6rem;
  border-radius: var(--radius-sm);
  background: rgba(14, 14, 17, 0.72);
  color: #fff;
  pointer-events: none;
}
.ba__tag--before { left: 0.85rem; }
.ba__tag--after { right: 0.85rem; background: var(--color-accent); color: var(--color-brand-primary); }
.ba__caption {
  padding: 1rem 1.15rem 1.15rem;
  background: var(--color-surface);
  border-top: 1px solid var(--color-border);
}
.ba__caption h3 { font-size: 1.02rem; margin-bottom: 0.25rem; }
.ba__caption p { font-size: 0.86rem; color: var(--color-muted); margin: 0; }

/* --- Prozess (Farbspur) -------------------------------------------------- */
.process { position: relative; }
.process__track {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: visible;
}
.process__path { fill: none; stroke: var(--color-accent); stroke-width: 2.5; stroke-linecap: round; }
.process__list {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: clamp(1rem, 2vw, 2rem);
  list-style: none;
  margin: 0; padding: 0;
  position: relative;
}
.process__step { margin: 0; }
.process__num {
  font-family: var(--font-mono);
  font-size: 0.76rem;
  letter-spacing: 0.16em;
  color: var(--color-accent-ink);
  display: block;
  margin-bottom: 0.9rem;
}
.on-dark .process__num { color: var(--color-accent); }
.process__dot {
  width: 13px; height: 13px;
  border-radius: 50%;
  background: var(--color-surface);
  border: 2px solid var(--color-accent);
  margin-bottom: 1.1rem;
  transition: background var(--transition-normal), transform var(--transition-normal);
}
.on-dark .process__dot { background: var(--color-dark); }
.process__step.is-active .process__dot { background: var(--color-accent); transform: scale(1.25); }
.process__step h3 { font-size: 1.02rem; margin-bottom: 0.4rem; }
.process__step p { font-size: 0.88rem; color: var(--color-muted); margin: 0; }
.on-dark .process__step p { color: var(--color-muted-invert); }

/* --- FAQ ---------------------------------------------------------------- */
.faq { border-top: 1px solid var(--color-border); }
.faq__item { border-bottom: 1px solid var(--color-border); }
.faq__q {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  width: 100%;
  padding: 1.35rem 0;
  background: none;
  border: 0;
  font: inherit;
  font-size: clamp(1rem, 1.6vw, 1.15rem);
  font-weight: 600;
  letter-spacing: -0.015em;
  color: var(--color-brand-primary);
  text-align: left;
  cursor: pointer;
}
/* Farbknopf: füllt sich beim Öffnen mit Gold, das Plus dreht sich zum Minus */
.faq__icon {
  position: relative;
  width: 40px;
  height: 40px;
  flex: none;
  border-radius: 50%;
  border: 1.5px solid var(--color-border-strong);
  background: radial-gradient(circle, var(--color-accent) 0 58%, rgba(240, 192, 36, 0) 60%)
              center / 0% 0% no-repeat;
  transition: background-size 480ms cubic-bezier(0.16, 1, 0.3, 1),
              border-color 300ms ease;
}
.faq__icon::before, .faq__icon::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 14px;
  height: 2px;
  margin: -1px 0 0 -7px;
  border-radius: 2px;
  background: var(--color-accent-ink);
  transition: transform 420ms cubic-bezier(0.16, 1, 0.3, 1), opacity 300ms ease,
              background-color 300ms ease;
}
.faq__icon::after { transform: rotate(90deg); }
.faq__q:hover .faq__icon { border-color: var(--color-accent-deep); }
.faq__q[aria-expanded="true"] .faq__icon { background-size: 170% 170%; border-color: var(--color-accent); }
.faq__q[aria-expanded="true"] .faq__icon::before,
.faq__q[aria-expanded="true"] .faq__icon::after { background: var(--color-brand-primary); }
.faq__q[aria-expanded="true"] .faq__icon::after { transform: rotate(180deg); opacity: 0; }
.faq__q:focus-visible { outline: 2px solid var(--color-accent-deep); outline-offset: 4px; }

/* goldene Kante läuft unter der geöffneten Frage durch */
.faq__item { position: relative; }
.faq__item::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 2px;
  background: var(--color-accent);
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 700ms cubic-bezier(0.16, 1, 0.3, 1);
}
.faq__item:has(.faq__q[aria-expanded="true"])::after { transform: scaleX(1); }
.on-dark .faq__icon { border-color: rgba(246, 243, 238, 0.28); }
.on-dark .faq__icon::before, .on-dark .faq__icon::after { background: var(--color-accent); }

.faq__a {
  overflow: hidden;
  height: 0;
  transition: height var(--transition-normal);
}
.faq__a-inner { padding: 0 0 1.4rem; max-width: 68ch; color: var(--color-muted); }

/* --- Info-/Feature-Kacheln --------------------------------------------- */
.tile {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: clamp(1.25rem, 2.4vw, 2rem);
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  transition: border-color var(--transition-normal), transform var(--transition-normal);
}
.tile:hover { border-color: var(--color-border-strong); }
.tile__num {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.16em;
  color: var(--color-accent-ink);
}
.tile h3 { font-size: 1.1rem; }
.tile p { font-size: 0.92rem; color: var(--color-muted); margin: 0; }
.on-dark .tile {
  background: rgba(246, 243, 238, 0.035);
  border-color: rgba(246, 243, 238, 0.12);
}
.on-dark .tile p { color: var(--color-muted-invert); }
.on-dark .tile__num { color: var(--color-accent); }

/* --- Zitat / Statement --------------------------------------------------- */
.statement {
  font-size: clamp(1.35rem, 2.6vw, 2.15rem);
  line-height: 1.28;
  letter-spacing: -0.025em;
  font-weight: 500;
  max-width: 24ch;
}
.statement em { font-style: normal; color: var(--color-accent-ink); }
.on-dark .statement em { color: var(--color-accent); }

/* --- Kennzahlen --------------------------------------------------------- */
.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: clamp(1rem, 2vw, 2rem); }
.stat__value {
  font-size: clamp(2rem, 4.5vw, 3.4rem);
  font-weight: 600;
  letter-spacing: -0.045em;
  line-height: 1;
  color: var(--color-brand-primary);
}
.on-dark .stat__value { color: var(--color-text-invert); }
.stat__value sup { font-size: 0.42em; vertical-align: super; color: var(--color-accent-deep); }
.on-dark .stat__value sup { color: var(--color-accent); }
.stat__label {
  margin-top: 0.5rem;
  font-size: 0.85rem;
  color: var(--color-muted);
  max-width: 22ch;
}
.on-dark .stat__label { color: var(--color-muted-invert); }

/* --- Formular ----------------------------------------------------------- */
.form { display: grid; gap: 1.1rem; }
.form__row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.1rem; }
.field { display: grid; gap: 0.4rem; }
.field label { font-size: 0.82rem; font-weight: 600; letter-spacing: 0.01em; }
.field label .opt { font-weight: 400; color: var(--color-muted); }
.field input, .field select, .field textarea {
  font: inherit;
  font-size: 0.95rem;
  padding: 0.85rem 0.95rem;
  min-height: 50px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  background: var(--color-surface);
  color: var(--color-text);
  width: 100%;
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}
.field textarea { min-height: 150px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none;
  border-color: var(--color-accent-deep);
  box-shadow: 0 0 0 3px rgba(240, 192, 36, 0.22);
}
.field__hint { font-size: 0.76rem; color: var(--color-muted); }
.form__note {
  font-size: 0.8rem;
  color: var(--color-muted);
  background: var(--color-surface-alt-2);
  border-left: 3px solid var(--color-accent);
  padding: 0.85rem 1rem;
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
}
.checkbox { display: flex; gap: 0.7rem; align-items: flex-start; font-size: 0.85rem; }
.checkbox input { width: 20px; height: 20px; min-height: 0; flex: none; margin-top: 2px; accent-color: var(--color-accent-deep); }

/* --- Kontaktkacheln ----------------------------------------------------- */
.contact-tile {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1.15rem 1.25rem;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  background: var(--color-surface);
  transition: border-color var(--transition-normal), transform var(--transition-normal),
              box-shadow var(--transition-normal);
}
.contact-tile:hover { border-color: var(--color-accent); box-shadow: var(--shadow-sm); }
.contact-tile__icon {
  width: 44px; height: 44px; flex: none;
  display: grid; place-items: center;
  border-radius: 50%;
  background: var(--color-surface-alt-2);
}
.contact-tile__icon svg { width: 20px; height: 20px; fill: none; stroke: var(--color-brand-primary); stroke-width: 1.6; }
.contact-tile__label { display: block; font-family: var(--font-mono); font-size: 0.72rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--color-muted); }
.contact-tile__value { display: block; font-size: 1.02rem; font-weight: 600; letter-spacing: -0.015em; }

/* --- Breadcrumbs -------------------------------------------------------- */
.breadcrumbs { padding-top: calc(var(--header-height) + 1.35rem); }
.breadcrumbs ol {
  display: flex; flex-wrap: wrap; gap: 0.5rem;
  list-style: none; margin: 0; padding: 0;
  font-size: 0.78rem; color: var(--color-muted);
}
.breadcrumbs li { margin: 0; display: flex; gap: 0.5rem; align-items: center; }
.breadcrumbs li + li::before { content: "/"; color: var(--color-border-strong); }
.breadcrumbs a:hover { color: var(--color-accent-ink); }

/* --- Lightbox ----------------------------------------------------------- */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: var(--z-lightbox);
  display: none;
  place-items: center;
  background: rgba(10, 10, 12, 0.94);
  padding: clamp(1rem, 4vw, 3rem);
}
.lightbox.is-open { display: grid; }
.lightbox__img {
  max-width: min(1100px, 92vw);
  max-height: 82vh;
  width: auto;
  object-fit: contain;
  border-radius: var(--radius-md);
}
.lightbox__caption {
  margin-top: 1rem;
  text-align: center;
  color: rgba(246, 243, 238, 0.8);
  font-size: 0.86rem;
}
.lightbox__caption strong { display: block; color: #fff; font-size: 1rem; margin-bottom: 0.15rem; }
.lightbox__btn {
  position: absolute;
  width: 52px; height: 52px;
  display: grid; place-items: center;
  border-radius: 50%;
  background: rgba(246, 243, 238, 0.1);
  border: 1px solid rgba(246, 243, 238, 0.2);
  color: #fff;
  cursor: pointer;
  font-size: 1.4rem;
  line-height: 1;
  transition: background var(--transition-fast);
}
.lightbox__btn:hover { background: rgba(246, 243, 238, 0.2); }
.lightbox__close { top: 1.25rem; right: 1.25rem; }
.lightbox__prev { left: 1.25rem; top: 50%; transform: translateY(-50%); }
.lightbox__next { right: 1.25rem; top: 50%; transform: translateY(-50%); }

/* --- Hinweisbox --------------------------------------------------------- */
.notice {
  border: 1px dashed var(--color-border-strong);
  border-left: 3px solid var(--color-accent);
  background: var(--color-surface);
  padding: 1rem 1.15rem;
  border-radius: var(--radius-md);
  font-size: 0.88rem;
  color: var(--color-muted);
}

/* --- Bild mit Farbkante -------------------------------------------------- */
.figure {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--color-surface-alt-2);
}
.figure img { width: 100%; height: 100%; object-fit: cover; }
.figure figcaption {
  position: absolute;
  left: 0; bottom: 0;
  padding: 0.6rem 0.85rem;
  background: rgba(14, 14, 17, 0.76);
  color: #fff;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

/* ==========================================================================
   Farbwähler
   ========================================================================== */
.colorlab {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: clamp(1.75rem, 4vw, 3.5rem);
  align-items: start;
}

/* --- Raumvorschau -------------------------------------------------------- */
.roomview {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--color-surface-alt-2);
  box-shadow: var(--shadow-md);
  position: sticky;
  top: calc(var(--header-height) + 1.5rem);
}
.roomview__stage { position: relative; aspect-ratio: 4 / 3; }
.roomview svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.roomview__wall,
.roomview__wall-side { transition: fill 700ms cubic-bezier(0.4, 0, 0.2, 1); }

/* Farbrolle: neue Farbe wird über die Fläche gezogen */
.roomview__roll {
  position: absolute;
  inset: 0;
  background: var(--roll, transparent);
  clip-path: inset(0 100% 0 0);
  pointer-events: none;
}
.roomview__roll.is-rolling {
  animation: rollIn 760ms cubic-bezier(0.62, 0.02, 0.2, 1) forwards;
}
@keyframes rollIn {
  from { clip-path: inset(0 100% 0 0); }
  to   { clip-path: inset(0 0 0 0); }
}

.roomview__bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 1.25rem;
  background: var(--color-surface);
  border-top: 1px solid var(--color-border);
  flex-wrap: wrap;
}
.roomview__name { font-size: 1.05rem; font-weight: 600; letter-spacing: -0.02em; }
.roomview__meta {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--color-muted);
  margin-top: 0.2rem;
  display: block;
}
.roomview__chip {
  width: 34px; height: 34px;
  border-radius: 50%;
  border: 1px solid rgba(0, 0, 0, 0.12);
  background: var(--chip, #fff);
  flex: none;
  transition: background 500ms ease;
}
.roomview__light {
  display: inline-flex;
  gap: 0.35rem;
  align-items: center;
  font-size: 0.78rem;
  color: var(--color-muted);
}
.roomview__toggle {
  border: 1px solid var(--color-border);
  background: var(--color-surface);
  border-radius: var(--radius-pill);
  padding: 0.4rem 0.85rem;
  font: inherit;
  font-size: 0.78rem;
  cursor: pointer;
  min-height: 38px;
  transition: border-color var(--transition-fast), background var(--transition-fast);
}
.roomview__toggle[aria-pressed="true"] {
  background: var(--color-brand-primary);
  border-color: var(--color-brand-primary);
  color: var(--color-surface-alt);
}

/* --- Farbfelder ---------------------------------------------------------- */
.palette { display: grid; gap: var(--space-md); }
.palette__group + .palette__group { margin-top: 0.75rem; }
.palette__head { margin-bottom: 0.9rem; }
.palette__head h3 { font-size: 1.05rem; margin-bottom: 0.25rem; }
.palette__head p { font-size: 0.86rem; color: var(--color-muted); margin: 0; max-width: 52ch; }

.palette__grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(104px, 1fr));
  gap: 0.6rem;
}
.tone {
  position: relative;
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  border-radius: var(--radius-md);
  background: none;
  cursor: pointer;
  text-align: left;
  font: inherit;
  transform: translateZ(0);
  transition: transform var(--transition-normal);
}
.tone:hover { transform: translateY(-4px); }
.tone__chip {
  display: block;
  aspect-ratio: 5 / 4;
  border-radius: var(--radius-md);
  background: var(--tone);
  box-shadow: var(--shadow-sm);
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(0, 0, 0, 0.07);
  transition: box-shadow var(--transition-normal);
}
.tone__chip::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(155deg, rgba(255, 255, 255, 0.42), rgba(255, 255, 255, 0) 46%,
                              rgba(0, 0, 0, 0.1));
  opacity: 0.9;
  transition: opacity var(--transition-normal);
}
.tone:hover .tone__chip { box-shadow: var(--shadow-md); }
.tone:hover .tone__chip::after { opacity: 0.55; }
.tone__name {
  display: block;
  margin-top: 0.45rem;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: -0.01em;
}
.tone__use { display: block; font-size: 0.76rem; color: var(--color-muted); }
.tone[aria-pressed="true"] .tone__chip {
  box-shadow: 0 0 0 2px var(--color-surface), 0 0 0 4px var(--color-brand-primary),
              var(--shadow-md);
}
.tone[aria-pressed="true"]::after {
  content: "";
  position: absolute;
  top: 0.45rem; right: 0.45rem;
  width: 18px; height: 18px;
  border-radius: 50%;
  background: var(--color-brand-primary);
  background-image:
    linear-gradient(var(--color-accent), var(--color-accent));
  background-size: 8px 2px;
  background-repeat: no-repeat;
  background-position: center;
}

/* --- Merkliste ----------------------------------------------------------- */
.shortlist {
  margin-top: var(--space-md);
  padding: 1.1rem 1.25rem;
  border: 1px dashed var(--color-border-strong);
  border-radius: var(--radius-lg);
  background: var(--color-surface);
}
.shortlist__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.85rem;
}
.shortlist__head h3 { font-size: 0.95rem; }
.shortlist__hint { font-size: 0.76rem; color: var(--color-muted); }
.shortlist__items { display: flex; flex-wrap: wrap; gap: 0.5rem; min-height: 42px; }
.shortlist__item {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.35rem 0.5rem 0.35rem 0.35rem;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-pill);
  background: var(--color-surface-alt);
  font-size: 0.82rem;
  animation: chipIn 320ms cubic-bezier(0.16, 0.84, 0.44, 1) both;
}
@keyframes chipIn {
  from { opacity: 0; transform: scale(0.86) translateY(6px); }
  to   { opacity: 1; transform: none; }
}
.shortlist__item i {
  width: 22px; height: 22px;
  border-radius: 50%;
  background: var(--tone);
  border: 1px solid rgba(0, 0, 0, 0.12);
  flex: none;
}
.shortlist__item button {
  border: 0;
  background: none;
  cursor: pointer;
  font: inherit;
  font-size: 1rem;
  line-height: 1;
  color: var(--color-muted);
  padding: 0 0.15rem;
  min-height: 24px;
}
.shortlist__item button:hover { color: var(--color-brand-primary); }
.shortlist__empty { font-size: 0.82rem; color: var(--color-muted); align-self: center; }

/* --- Raster für mehrere Vorher/Nachher-Vergleiche ------------------------ */
.ba-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: clamp(1rem, 2vw, 1.75rem);
}
.ba-grid > .ba {
  flex: 1 1 300px;
  max-width: 385px;
  margin: 0;
}
@media (max-width: 640px) {
  .ba-grid > .ba { flex-basis: 100%; max-width: none; }
}

/* ==========================================================================
   Farbpalette zum Schieben (Startseite)
   ========================================================================== */
.palrail { position: relative; }

/* --- Musterfläche: zeigt den zuletzt gewählten Ton --------------------- */
.palrail__preview {
  position: relative;
  height: clamp(112px, 15vw, 190px);
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--pal-color, #cbbba6);
  transition: background 700ms cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  align-items: flex-end;
  margin-bottom: clamp(1.25rem, 3vw, 2rem);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.12);
}
.palrail__roll {
  position: absolute;
  inset: 0;
  background: var(--roll, transparent);
  clip-path: inset(0 100% 0 0);
  pointer-events: none;
}
.palrail__roll.is-rolling { animation: rollIn 720ms cubic-bezier(0.62, 0.02, 0.2, 1) forwards; }
.palrail__caption {
  position: relative;
  z-index: 2;
  padding: clamp(0.9rem, 2vw, 1.4rem) clamp(1rem, 2.4vw, 1.75rem);
  display: flex;
  align-items: baseline;
  gap: 0.9rem;
  flex-wrap: wrap;
  width: 100%;
  background: linear-gradient(0deg, rgba(16, 16, 20, 0.42), transparent);
}
.palrail__name {
  font-size: clamp(1.05rem, 2.2vw, 1.5rem);
  font-weight: 600;
  letter-spacing: -0.02em;
  color: #fff;
  text-shadow: 0 1px 14px rgba(0, 0, 0, 0.4);
}
.palrail__use {
  font-family: var(--font-mono);
  font-size: 0.74rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.82);
  text-shadow: 0 1px 12px rgba(0, 0, 0, 0.5);
}

/* --- Kopfzeile mit Filtern und Pfeilen ---------------------------------- */
.palrail__bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.1rem;
  flex-wrap: wrap;
}
.palrail__filters { display: flex; flex-wrap: wrap; gap: 0.45rem; }

/* Filter auf dunklem Grund: ruhige Umrisse, aktiver Zustand in Gold */
.on-dark .filter-btn {
  background: transparent;
  border-color: rgba(246, 243, 238, 0.28);
  color: rgba(246, 243, 238, 0.82);
}
.on-dark .filter-btn:hover { border-color: var(--color-accent); color: #fff; }
.on-dark .filter-btn.is-active {
  background: var(--color-accent);
  border-color: var(--color-accent);
  color: var(--color-brand-primary);
}
.palrail__arrows { display: flex; gap: 0.4rem; }
.palrail__arrow {
  width: 42px; height: 42px;
  border-radius: 50%;
  border: 1px solid rgba(246, 243, 238, 0.28);
  background: transparent;
  color: rgba(246, 243, 238, 0.9);
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: background var(--transition-fast), border-color var(--transition-fast),
              transform var(--transition-fast), opacity var(--transition-fast);
}
.palrail__arrow:hover { background: var(--color-accent); border-color: var(--color-accent);
  color: var(--color-brand-primary); }
.palrail__arrow:active { transform: scale(0.94); }
.palrail__arrow[disabled] { opacity: 0.3; cursor: default; }
.palrail__arrow svg { width: 17px; height: 17px; }

/* --- Schiene ------------------------------------------------------------ */
.palrail__viewport {
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: none;
  -ms-overflow-style: none;
  cursor: grab;
  scroll-snap-type: x proximity;
  scroll-padding-inline-start: var(--gutter);
  padding-block: 0.4rem 1.1rem;
  margin-inline: calc(var(--gutter) * -1);
  -webkit-overflow-scrolling: touch;
}
.palrail__viewport::-webkit-scrollbar { display: none; }
.palrail__viewport.is-dragging { cursor: grabbing; scroll-snap-type: none; }
.palrail__viewport.is-dragging .palchip { pointer-events: none; }

.palrail__track {
  display: flex;
  gap: clamp(0.6rem, 1.3vw, 1rem);
  width: max-content;
  padding-inline: var(--gutter);
}

/* --- Farbkarte ---------------------------------------------------------- */
.palchip {
  position: relative;
  flex: none;
  width: clamp(126px, 14vw, 176px);
  border: 0;
  padding: 0;
  background: none;
  text-align: left;
  cursor: pointer;
  scroll-snap-align: start;
  font: inherit;
  transition: transform 420ms cubic-bezier(0.16, 0.84, 0.44, 1),
              opacity 320ms ease;
}
.palchip__face {
  display: block;
  aspect-ratio: 3 / 4.2;
  border-radius: var(--radius-md);
  background: var(--tone);
  position: relative;
  overflow: hidden;
  box-shadow: 0 10px 24px -14px rgba(16, 16, 20, 0.9);
  transition: box-shadow var(--transition-normal), transform var(--transition-normal);
}
.palchip__face::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(152deg, rgba(255, 255, 255, 0.4), rgba(255, 255, 255, 0) 44%,
                              rgba(0, 0, 0, 0.14));
  transition: opacity var(--transition-normal);
}
.palchip__face::before {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 34%;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.18), transparent);
  opacity: 0;
  transition: opacity var(--transition-normal);
}
.palchip__meta { display: block; padding: 0.6rem 0.15rem 0; }
.palchip__name {
  display: block;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--color-text-invert);
  letter-spacing: -0.01em;
}
.palchip__use {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(246, 243, 238, 0.5);
  margin-top: 0.15rem;
}
.palchip:hover .palchip__face { transform: translateY(-6px); box-shadow: 0 20px 34px -16px rgba(16, 16, 20, 0.95); }
.palchip:hover .palchip__face::after { opacity: 0.55; }
.palchip:hover .palchip__face::before { opacity: 1; }
.palchip[aria-pressed="true"] .palchip__face {
  box-shadow: 0 0 0 2px var(--color-dark), 0 0 0 4px var(--color-accent),
              0 18px 30px -16px rgba(16, 16, 20, 0.95);
}
.palchip[aria-pressed="true"] .palchip__name { color: var(--color-accent); }

/* Ein- und Ausblenden beim Filtern */
.palchip.is-hidden { display: none; }
.palchip.is-entering { animation: chipEnter 420ms cubic-bezier(0.16, 0.84, 0.44, 1) both; }
@keyframes chipEnter {
  from { opacity: 0; transform: translateY(14px) scale(0.94); }
  to   { opacity: 1; transform: none; }
}

/* Fortschritt der Schiene */
.palrail__progress {
  height: 2px;
  background: rgba(246, 243, 238, 0.14);
  border-radius: 2px;
  overflow: hidden;
  margin-top: 0.4rem;
}
.palrail__progress i {
  display: block;
  height: 100%;
  width: 30%;
  background: var(--color-accent);
  border-radius: 2px;
  transform-origin: left center;
  transition: transform 120ms linear, width 260ms ease;
}
.palrail__hint {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(246, 243, 238, 0.4);
  margin-top: 0.9rem;
}

@media (prefers-reduced-motion: reduce) {
  .palchip.is-entering { animation: none !important; }
  .palchip:hover .palchip__face { transform: none !important; }
  .palrail__roll { display: none !important; }
}

/* ==========================================================================
   Farbtrommel: drehbare Palette (Startseite)
   ========================================================================== */
.pglobe {
  position: relative;
  --r: 420px;                       /* Radius der Trommel                    */
  --step: 12deg;                    /* Winkel zwischen zwei Karten           */
  --angle: 0deg;
}

.pglobe__stage {
  position: relative;
  height: clamp(290px, 27vw, 350px);
  perspective: 1500px;
  perspective-origin: 50% 50%;
  overflow: hidden;
  cursor: grab;
  touch-action: pan-y;
  -webkit-tap-highlight-color: transparent;
}
.pglobe__stage.is-dragging { cursor: grabbing; }

/* Boden- und Randverlauf, damit die Trommel weich ausläuft */
.pglobe__stage::before,
.pglobe__stage::after {
  content: "";
  position: absolute;
  top: 0; bottom: 0;
  width: clamp(40px, 9vw, 130px);
  z-index: 4;
  pointer-events: none;
}
.pglobe__stage::before { left: 0; background: linear-gradient(90deg, var(--color-dark), transparent); }
.pglobe__stage::after { right: 0; background: linear-gradient(270deg, var(--color-dark), transparent); }

.pglobe__ring {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 0; height: 0;
  transform-style: preserve-3d;
  transform: translate(-50%, -50%) translateZ(calc(var(--r) * -1)) rotateY(var(--angle));
  will-change: transform;
}

/* --- einzelne Farbkarte ------------------------------------------------- */
.pcard {
  position: absolute;
  left: 50%;
  top: 50%;
  width: clamp(104px, 10.5vw, 138px);
  margin-left: calc(clamp(104px, 10.5vw, 138px) / -2);
  margin-top: calc(clamp(140px, 14vw, 184px) / -2);
  height: clamp(140px, 14vw, 184px);
  transform: rotateY(calc(var(--i) * var(--step))) translateZ(var(--r));
  backface-visibility: hidden;
  border: 0;
  padding: 0;
  background: none;
  cursor: pointer;
  font: inherit;
  transition: opacity 300ms ease;
}
.pcard__face {
  position: absolute;
  inset: 0;
  border-radius: var(--radius-md);
  background: var(--tone);
  box-shadow: 0 16px 30px -18px rgba(0, 0, 0, 0.9),
              inset 0 0 0 1px rgba(255, 255, 255, 0.14);
  overflow: hidden;
  transition: transform 380ms cubic-bezier(0.16, 0.84, 0.44, 1),
              box-shadow 380ms ease;
}
.pcard__face::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(158deg, rgba(255, 255, 255, 0.42), rgba(255, 255, 255, 0) 46%,
                              rgba(0, 0, 0, 0.16));
}
/* Name und RAL-Nummer auf jeder Karte – auf einem ruhigen Band, damit sie
   auf hellen wie dunklen Tönen lesbar bleiben */
.pcard__ral {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  z-index: 2;
  padding: 0.55rem 0.6rem 0.6rem;
  display: grid;
  gap: 0.1rem;
  text-align: left;
  background: rgba(16, 16, 20, 0.62);
  color: #fff;
}
.pcard__ral b {
  font-family: var(--font-body);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: -0.005em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.pcard__ral span {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  color: var(--color-accent);
}
.pcard--light .pcard__ral {
  background: rgba(255, 255, 255, 0.7);
  color: var(--color-brand-primary);
}
.pcard--light .pcard__ral span { color: #8a6b00; }

/* vordere Karte */
.pcard.is-front .pcard__face {
  transform: scale(1.14);
  box-shadow: 0 26px 44px -18px rgba(0, 0, 0, 0.95),
              inset 0 0 0 2px var(--color-accent);
}
.pcard.is-hidden { display: none; }

/* --- Anzeige unter der Trommel ------------------------------------------ */
.pglobe__readout {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(0.6rem, 2vw, 1.4rem);
  flex-wrap: wrap;
  text-align: center;
  margin-top: clamp(1rem, 2.5vw, 1.75rem);
  min-height: 3.4rem;
}
.pglobe__swatch {
  width: 40px; height: 40px;
  border-radius: 50%;
  background: var(--pal-color, #d7d7d7);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.25);
  transition: background 420ms cubic-bezier(0.4, 0, 0.2, 1);
  flex: none;
}
.pglobe__name {
  font-size: clamp(1.15rem, 2.4vw, 1.7rem);
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--color-text-invert);
}
.pglobe__ral {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  color: var(--color-accent);
}
.pglobe__use {
  font-family: var(--font-mono);
  font-size: 0.74rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(246, 243, 238, 0.5);
}
.pglobe__readout.is-updating { animation: readoutIn 420ms cubic-bezier(0.16, 0.84, 0.44, 1); }

/* --- Bedienung ----------------------------------------------------------- */
.pglobe__controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: clamp(1rem, 2.5vw, 1.6rem);
}
.pglobe__hint {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(246, 243, 238, 0.42);
  text-align: center;
  margin-top: 0.9rem;
}

@media (prefers-reduced-motion: reduce) {
  .pcard, .pcard__face, .pglobe__ring { transition: none !important; }
  .pglobe__readout.is-updating { animation: none !important; }
}


/* ==========================================================================
   Ablauf als 3D-Treppe (Startseite)
   Sechs Stufen wachsen beim Erscheinen aus dem Boden. Die Beschriftung steigt
   Schritt für Schritt nach oben, die aktive Stufe hebt sich golden ab.
   Grundzustand (ohne JS): Treppe steht, alle Texte in der Liste sichtbar.
   ========================================================================== */
@property --lift { syntax: "<length>"; inherits: true; initial-value: 0px; }

.ablauf__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
  gap: clamp(2rem, 5vw, 5rem);
  align-items: center;
}

/* --- Szene ---------------------------------------------------------------- */
.ablauf__scene {
  position: relative;
  perspective: 1500px;
  perspective-origin: 50% 36%;
  height: clamp(380px, 40vw, 540px);
  display: grid;
  place-items: center;
}
.ablauf__stage {
  --sw: 64px;       /* Breite einer Stufe   */
  --d: 150px;       /* Tiefe der Treppe     */
  --rise: 26px;     /* Höhe pro Stufe       */
  --tilt: 56deg;
  --turn: -38deg;
  position: relative;
  width: calc(var(--sw) * 6);
  height: var(--d);
  transform-style: preserve-3d;
  /* --tx/--ty: Lage in der Szene, auf dem Handy angepasst (Platz für das Schild) */
  transform: translate3d(var(--tx, 0px), var(--ty, 12%), 0) scale(var(--s, 1.2))
             rotateX(calc(var(--tilt) + var(--rx, 0deg)))
             rotateZ(calc(var(--turn) + var(--rz, 0deg)));
  transition: transform 700ms cubic-bezier(0.16, 1, 0.3, 1);
}

/* weicher Schatten auf dem Boden */
.ablauf__shadow {
  position: absolute;
  inset: -4% -8% -26% 2%;
  background: radial-gradient(closest-side, rgba(22, 22, 26, 0.3), rgba(22, 22, 26, 0));
  filter: blur(8px);
  transform: translateZ(-1px);
}

/* --- Eine Stufe: Oberseite, Vorderseite, Stirnseite ----------------------- */
.stufe {
  position: absolute;
  top: 0;
  left: calc(var(--i) * var(--sw));
  width: var(--sw);
  height: var(--d);
  transform-style: preserve-3d;
  transform-origin: 50% 50% 0;
  cursor: pointer;
  transition: transform 1000ms cubic-bezier(0.16, 1, 0.3, 1) calc(var(--i) * 120ms),
              --lift 550ms cubic-bezier(0.16, 1, 0.3, 1);
}
.stufe > span { position: absolute; display: block; }
.stufe__top {
  inset: 0;
  background: var(--t);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.28);
  transform: translateZ(calc(var(--h) + var(--lift)));
  display: grid;
  place-items: center;
  transition: background-color 450ms ease;
}
.stufe__top b {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.1em;
  color: rgba(22, 22, 26, 0.5);
  transform: rotate(38deg);
  transition: color 450ms ease;
}
/* Vorderseite: steht an der vorderen Kante auf */
.stufe__front {
  left: 0;
  top: 100%;
  width: 100%;
  height: calc(var(--h) + var(--lift));
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.1), rgba(0, 0, 0, 0.06)), var(--f);
  transform-origin: top center;
  transform: rotateX(90deg);
  transition: background-color 450ms ease;
}
/* Stirnseite (Setzstufe): steht an der linken Kante auf */
.stufe__side {
  left: 0;
  top: 0;
  width: calc(var(--h) + var(--lift));
  height: 100%;
  background: var(--sd);
  transform-origin: left center;
  transform: rotateY(-90deg);
  transition: background-color 450ms ease;
}

/* aktive Stufe: hebt sich an und wird golden */
.stufe.is-active { --lift: 14px; }
.stufe.is-active .stufe__top { background: var(--color-accent); }
.stufe.is-active .stufe__front { background: #c8951a; }
.stufe.is-active .stufe__side { background: #a57a12; }
.stufe.is-active .stufe__top b { color: rgba(22, 22, 26, 0.8); }

/* Aufbau: vor dem Erscheinen liegen die Stufen flach am Boden */
.is-live .stufe { transform: scale3d(1, 1, 0.02); }
.is-live.is-built .stufe { transform: none; }

/* --- Schwebende Beschriftung über der aktiven Stufe ------------------------ */
.ablauf__label {
  position: absolute;
  left: 0;
  top: 0;
  transform-style: preserve-3d;
  transform: translate3d(calc((var(--m, 0) + 0.5) * var(--sw)),
                         calc(var(--d) * 0.5),
                         calc((var(--m, 0) + 1) * var(--rise) + 14px))
             rotateZ(calc(0deg - var(--turn) - var(--rz, 0deg)))
             rotateX(calc(0deg - var(--tilt) - var(--rx, 0deg)));
  transition: transform 750ms cubic-bezier(0.16, 1, 0.3, 1);
  pointer-events: none;
  opacity: 0;
}
.is-live.is-built .ablauf__label.is-on { opacity: 1; transition: transform 750ms cubic-bezier(0.16, 1, 0.3, 1), opacity 400ms ease; }
.ablauf__chip {
  position: absolute;
  left: 0;
  bottom: 30px;
  transform: translateX(-50%);
  display: inline-flex;
  align-items: baseline;
  gap: 0.5rem;
  padding: 0.55rem 0.9rem;
  border-radius: 999px;
  background: var(--color-brand-primary);
  color: var(--color-text-invert);
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  white-space: nowrap;
  box-shadow: 0 14px 28px -14px rgba(16, 16, 20, 0.7);
}
.ablauf__chip b {
  font-family: var(--font-mono);
  font-size: 0.78em;
  letter-spacing: 0.12em;
  color: var(--color-accent);
}
/* Faden vom Schild zur Stufe */
.ablauf__chip::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 100%;
  width: 1.5px;
  height: 30px;
  background: linear-gradient(var(--color-brand-primary), var(--color-accent));
  transform: translateX(-50%);
}
.ablauf__chip.is-swap { animation: ablaufSwap 420ms cubic-bezier(0.16, 1, 0.3, 1); }
@keyframes ablaufSwap {
  from { opacity: 0.2; transform: translateX(-50%) translateY(6px); }
  to   { opacity: 1;   transform: translateX(-50%) translateY(0); }
}

/* --- Liste der Schritte ----------------------------------------------------- */
.ablauf__liste {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.3rem;
}
.ablauf__schritt {
  display: grid;
  grid-template-columns: 2.4rem minmax(0, 1fr);
  gap: 1rem;
  align-items: start;
  margin: 0;
  padding: 0.85rem 1rem;
  border-radius: 12px;
  cursor: pointer;
  transition: background-color 350ms ease, box-shadow 350ms ease;
}
.ablauf__schritt:focus-visible { outline: 2px solid var(--color-accent-deep); outline-offset: 2px; }
.ablauf__schritt.is-active { background: var(--color-surface); box-shadow: var(--shadow-md); }
.ablauf__nr {
  width: 2.4rem;
  height: 2.4rem;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  color: var(--color-muted);
  border: 1px solid var(--color-border-strong);
  transition: background-color 350ms ease, border-color 350ms ease, color 350ms ease;
}
.ablauf__schritt.is-active .ablauf__nr {
  background: var(--color-accent);
  border-color: var(--color-accent);
  color: var(--color-brand-primary);
}
.ablauf__schritt h3 { font-size: 1.08rem; margin: 0.45rem 0 0.2rem; }
.ablauf__schritt p { font-size: 0.9rem; color: var(--color-muted); margin: 0; }

@media (prefers-reduced-motion: reduce) {
  .stufe, .ablauf__label { transition: none !important; }
  .ablauf__chip.is-swap { animation: none !important; }
}

/* ==========================================================================
   Farbpalette zum Scrollen mit räumlicher Staffelung
   ========================================================================== */
.pflow { position: relative; }

/* Musterfläche über der Palette */
.pflow__preview {
  position: relative;
  height: clamp(96px, 12vw, 150px);
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--pal-color, #f1ede1);
  transition: background 600ms cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  align-items: flex-end;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.12);
}
.pflow__roll {
  position: absolute; inset: 0;
  background: var(--roll, transparent);
  clip-path: inset(0 100% 0 0);
  pointer-events: none;
}
.pflow__roll.is-rolling { animation: rollIn 700ms cubic-bezier(0.62, 0.02, 0.2, 1) forwards; }
.pflow__caption {
  position: relative; z-index: 2;
  width: 100%;
  padding: clamp(0.7rem, 1.8vw, 1.15rem) clamp(0.9rem, 2.2vw, 1.5rem);
  display: flex; align-items: baseline; gap: 0.8rem; flex-wrap: wrap;
  background: linear-gradient(0deg, rgba(16, 16, 20, 0.4), transparent);
}
.pflow__name {
  font-size: clamp(1rem, 2.1vw, 1.4rem); font-weight: 600; letter-spacing: -0.02em;
  color: #fff; text-shadow: 0 1px 12px rgba(0, 0, 0, 0.45);
}
.pflow__ral {
  font-family: var(--font-mono); font-size: 0.75rem; letter-spacing: 0.16em;
  color: var(--color-accent); text-shadow: 0 1px 10px rgba(0, 0, 0, 0.5);
}
.pflow__use {
  font-family: var(--font-mono); font-size: 0.72rem; letter-spacing: 0.12em;
  text-transform: uppercase; color: rgba(255, 255, 255, 0.78);
}

/* Schiene */
.pflow__viewport {
  margin-top: clamp(1rem, 2.5vw, 1.75rem);
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: none;
  -ms-overflow-style: none;
  scroll-snap-type: x mandatory;
  perspective: 1200px;
  perspective-origin: 50% 45%;
  padding-block: clamp(1.5rem, 3vw, 2.5rem);
  overscroll-behavior-x: contain;
}
.pflow__viewport::-webkit-scrollbar { display: none; }
.pflow__track {
  display: flex;
  align-items: center;
  gap: clamp(0.5rem, 1.2vw, 0.9rem);
  width: max-content;
  transform-style: preserve-3d;
  padding-inline: calc(50% - clamp(64px, 7vw, 88px));
}

/* Farbkarte */
.pcard2 {
  position: relative;
  flex: none;
  width: clamp(128px, 14vw, 176px);
  border: 0; padding: 0; background: none; cursor: pointer; font: inherit;
  scroll-snap-align: center;
  transform-style: preserve-3d;
  will-change: transform;
}
.pcard2__face {
  display: block;
  aspect-ratio: 3 / 4.2;
  border-radius: var(--radius-md);
  background: var(--tone);
  position: relative;
  overflow: hidden;
  box-shadow: 0 18px 34px -20px rgba(16, 16, 20, 0.95),
              inset 0 0 0 1px rgba(255, 255, 255, 0.12);
  transition: box-shadow 400ms ease;
}
.pcard2__face::after {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(155deg, rgba(255, 255, 255, 0.4), rgba(255, 255, 255, 0) 46%,
                              rgba(0, 0, 0, 0.16));
}
.pcard2__ral {
  position: absolute; left: 0; right: 0; bottom: 0; z-index: 2;
  padding: 0.5rem 0.6rem;
  font-family: var(--font-mono); font-size: 0.58rem; letter-spacing: 0.1em;
  color: rgba(255, 255, 255, 0.92);
  background: linear-gradient(0deg, rgba(10, 10, 13, 0.5), transparent);
  text-align: left;
}
.pcard2--light .pcard2__ral {
  color: rgba(16, 16, 20, 0.7);
  background: linear-gradient(0deg, rgba(255, 255, 255, 0.5), transparent);
}
.pcard2__name {
  display: block; margin-top: 0.6rem;
  font-size: 0.82rem; font-weight: 600; color: var(--color-text-invert);
  opacity: 0.55; transition: opacity 300ms ease;
}
.pcard2.is-center .pcard2__name { opacity: 1; }
.pcard2.is-center .pcard2__face {
  box-shadow: 0 30px 46px -22px rgba(16, 16, 20, 0.95),
              inset 0 0 0 2px var(--color-accent);
}
.pcard2.is-hidden { display: none; }

.pflow__hint {
  font-family: var(--font-mono); font-size: 0.72rem; letter-spacing: 0.14em;
  text-transform: uppercase; color: rgba(246, 243, 238, 0.4);
  text-align: center; margin-top: 0.5rem;
}
.pflow__bar { height: 2px; background: rgba(246, 243, 238, 0.14); border-radius: 2px; overflow: hidden; }
.pflow__bar i {
  display: block; height: 100%; width: 20%;
  background: var(--color-accent); border-radius: 2px;
  transition: transform 120ms linear, width 260ms ease;
  transform-origin: left center;
}

@media (prefers-reduced-motion: reduce) {
  .pcard2 { transform: none !important; }
  .pflow__roll { display: none !important; }
  .pflow__viewport { scroll-snap-type: x proximity; }
}

/* ==========================================================================
   Musterfläche im echten Raum (Farbtöne-Seite)
   Der gewählte Ton wird über die Wandfläche eines Fotos gelegt. Multiply
   behält Licht, Schatten und Struktur der Wand bei.
   ========================================================================== */
.roomshot {
  position: relative;
  isolation: isolate;             /* Farbe bleibt im Bild                    */
  aspect-ratio: 3 / 4;
  overflow: hidden;
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  background: var(--color-surface-alt-2);
}
.roomshot > img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* Wandfläche – Form folgt der Wand im Foto */
.roomshot__wall,
.roomshot__roll {
  position: absolute;
  inset: 0;
  clip-path: polygon(0 9%, 47% 16.4%, 47% 50.4%, 0 55.4%);
  mix-blend-mode: multiply;
  pointer-events: none;
}
.roomshot__wall {
  background: var(--tone, #f1ede1);
  transition: background 620ms cubic-bezier(0.4, 0, 0.2, 1);
}
.roomshot__roll {
  background: var(--roll, transparent);
  -webkit-mask-image: linear-gradient(90deg, #000 50%, transparent 50%);
  mask-image: linear-gradient(90deg, #000 50%, transparent 50%);
  -webkit-mask-size: 220% 100%;
  mask-size: 220% 100%;
  -webkit-mask-position: -120% 0;
  mask-position: -120% 0;
  opacity: 0;
}
.roomshot__roll.is-rolling {
  opacity: 1;
  animation: wallRoll 760ms cubic-bezier(0.62, 0.02, 0.2, 1) forwards;
}
@keyframes wallRoll {
  from { -webkit-mask-position: -120% 0; mask-position: -120% 0; }
  to   { -webkit-mask-position: 0 0; mask-position: 0 0; }
}

/* Hinweis auf der Fläche */
.roomshot__tag {
  position: absolute;
  left: 0; top: 0;
  z-index: 3;
  padding: 0.45rem 0.9rem;
  background: var(--color-accent);
  color: var(--color-brand-primary);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
/* Abendlicht */
.roomshot.is-evening > img { filter: saturate(0.92) brightness(0.82) sepia(0.16); }
.roomshot > img { transition: filter 600ms ease; }

@media (prefers-reduced-motion: reduce) {
  .roomshot__roll { display: none !important; }
  .roomshot__wall { transition: none !important; }
}

/* ==========================================================================
   Referenzen: gleichmäßiges Raster mit Kategorieüberschriften
   ========================================================================== */
.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(272px, 1fr));
  gap: clamp(0.9rem, 1.8vw, 1.5rem);
  align-items: start;
}

/* Überschrift einer Kategorie – nimmt eine ganze Zeile ein */
.gallery__head {
  grid-column: 1 / -1;
  display: flex;
  align-items: baseline;
  gap: 0.9rem;
  flex-wrap: wrap;
  margin: clamp(1.25rem, 3vw, 2.25rem) 0 0;
  padding-bottom: 0.7rem;
  border-bottom: 1px solid var(--color-border);
}
.gallery__head:first-child { margin-top: 0; }
.gallery__head h3 {
  font-size: clamp(1.15rem, 2.2vw, 1.55rem);
  letter-spacing: -0.02em;
  margin: 0;
}
.gallery__head span {
  font-family: var(--font-mono);
  font-size: 0.74rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--color-muted);
}
.gallery.is-filtered .gallery__head { display: none; }

/* einzelne Aufnahme */
.shot {
  position: relative;
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
  font: inherit;
  border-radius: var(--radius-md);
  overflow: hidden;
  aspect-ratio: 4 / 3;
  box-shadow: var(--shadow-sm);
  transition: box-shadow var(--transition-normal), transform var(--transition-normal);
}
.shot img {
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 900ms cubic-bezier(0.22, 0.61, 0.36, 1);
}
.shot__overlay {
  position: absolute;
  inset: auto 0 0 0;
  padding: 1.5rem 0.9rem 0.8rem;
  background: linear-gradient(0deg, rgba(16, 16, 20, 0.82), transparent);
  color: var(--color-text-invert);
  text-align: left;
  transform: translateY(12%);
  opacity: 0;
  transition: opacity var(--transition-normal), transform var(--transition-normal);
}
.shot__title { display: block; font-size: 0.9rem; font-weight: 600; letter-spacing: -0.01em; }
.shot__meta {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(246, 243, 238, 0.72);
  margin-top: 0.15rem;
}
.shot__zoom {
  position: absolute;
  top: 0.6rem; right: 0.6rem;
  width: 30px; height: 30px;
  border-radius: 50%;
  background: rgba(16, 16, 20, 0.55);
  display: grid;
  place-items: center;
  opacity: 0;
  transform: scale(0.8);
  transition: opacity var(--transition-normal), transform var(--transition-normal);
}
.shot__zoom::before, .shot__zoom::after {
  content: "";
  position: absolute;
  background: #fff;
}
.shot__zoom::before { width: 12px; height: 1.5px; }
.shot__zoom::after { width: 1.5px; height: 12px; }

@media (hover: hover) and (pointer: fine) {
  .shot:hover { box-shadow: var(--shadow-md); transform: translateY(-3px); }
  .shot:hover img { transform: scale(1.06); }
  .shot:hover .shot__overlay, .shot:focus-visible .shot__overlay { opacity: 1; transform: none; }
  .shot:hover .shot__zoom, .shot:focus-visible .shot__zoom { opacity: 1; transform: none; }
}
/* auf Touchgeräten dauerhaft lesbar */
@media (hover: none) {
  .shot__overlay { opacity: 1; transform: none; }
}

.shot[hidden] { display: none; }
.shot.is-entering { animation: shotIn 460ms cubic-bezier(0.16, 0.84, 0.44, 1) both; }
@keyframes shotIn {
  from { opacity: 0; transform: translateY(14px) scale(0.96); }
  to   { opacity: 1; transform: none; }
}

/* Zähler über dem Raster */
.gallery-bar {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: clamp(1rem, 2.5vw, 1.75rem);
}
.gallery-bar__count {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--color-muted);
}
.filter-btn span {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  opacity: 0.6;
  margin-left: 0.35rem;
}

@media (prefers-reduced-motion: reduce) {
  .shot, .shot img, .shot__overlay { transition: none !important; }
  .shot.is-entering { animation: none !important; }
}

/* --- Porträt mit Platzhalter (Über uns) ---------------------------------- */
.portrait { margin: 0; }
.portrait__placeholder {
  position: relative;
  aspect-ratio: 4 / 5;
  border-radius: var(--radius-lg);
  background:
    radial-gradient(120% 90% at 30% 10%, rgba(240, 192, 36, 0.1), transparent 60%),
    linear-gradient(160deg, #22222a, #16161a);
  border: 1px dashed rgba(246, 243, 238, 0.22);
  display: grid;
  place-items: center;
  gap: 1rem;
  padding: 2rem;
  overflow: hidden;
}
.portrait__placeholder svg { width: min(46%, 200px); height: auto; opacity: 0.9; }
.portrait__note {
  font-family: var(--font-mono);
  font-size: 0.74rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(246, 243, 238, 0.45);
}
.portrait__caption {
  margin-top: 0.9rem;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--color-muted);
}

/* ==========================================================================
   Leistungen – Bühne, die beim Scrollen durch sieben Leistungen blättert
   Hintergrund: das Foto der Leistung, weich gezeichnet und in der Farbe der
   Leistung eingefärbt. Rechts das Foto scharf im Rahmen, links der Text.
   Alle Wechsel sind richtungsabhängig: vorwärts kommt Neues von unten,
   rückwärts von oben. Grundzustand (ohne .is-live): ruhige Liste.
   ========================================================================== */
@property --lsec-tone { syntax: "<color>"; inherits: true; initial-value: #2b2f33; }

.lsec {
  position: relative;
  background: #16161a;
  color: var(--color-text-invert);
  transition: --lsec-tone 1500ms cubic-bezier(0.45, 0, 0.25, 1),
              --lsec-ar 1000ms cubic-bezier(0.65, 0, 0.35, 1);
}
.lsec h2, .lsec h3 { color: var(--color-text-invert); }

/* --- Einleitung ----------------------------------------------------------- */
.lsec__intro {
  padding-block: var(--space-2xl) clamp(0.5rem, 1.5vw, 1.25rem);
}
.lsec__intro-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem 3rem;
}
.lsec__intro h2 {
  font-size: clamp(2.1rem, 1.35rem + 2.4vw, 3.6rem);
  letter-spacing: -0.035em;
  line-height: 1;
}
/* Pinselstrich auf „Leistungen“: dunkle Schrift auf Gold */
.lsec .roller.is-visible > span { color: var(--color-brand-primary); }
.lsec__intro-head p {
  margin: 0;
  max-width: 38ch;
  font-size: var(--fs-lead);
  line-height: 1.45;
  color: rgba(246, 243, 238, 0.78);
}

/* Übersicht aller Leistungen: Foto, Nummer, Name – führt in die Bühne */
.lsec__index {
  list-style: none;
  margin: clamp(2rem, 4vw, 3.25rem) 0 0;
  padding: clamp(1.5rem, 3vw, 2rem) 0 0;
  border-top: 1px solid rgba(246, 243, 238, 0.14);
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: clamp(0.6rem, 1.2vw, 1.1rem);
}
.lsec__index li { margin: 0; min-width: 0; }
.lsec__jump {
  display: grid;
  gap: 0.7rem;
  color: rgba(246, 243, 238, 0.78);
  text-decoration: none;
  border-radius: 12px;
}
.lsec__jump:focus-visible { outline: 2px solid var(--color-accent); outline-offset: 4px; }
.lsec__thumb {
  position: relative;
  display: block;
  aspect-ratio: 4 / 3;
  border-radius: 10px;
  overflow: hidden;
  background: #22222a;
}
.lsec__thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  filter: saturate(0.8) brightness(0.82);
  transform: scale(1.01);
  transition: transform 800ms cubic-bezier(0.16, 1, 0.3, 1), filter 450ms ease;
}
/* goldene Kante läuft beim Zeigen unten durch */
.lsec__thumb::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 3px;
  background: var(--color-accent);
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 500ms cubic-bezier(0.16, 1, 0.3, 1);
}
.lsec__jump:hover .lsec__thumb img,
.lsec__jump:focus-visible .lsec__thumb img { transform: scale(1.07); filter: none; }
.lsec__jump:hover .lsec__thumb::after,
.lsec__jump:focus-visible .lsec__thumb::after { transform: scaleX(1); }
.lsec__jump-label {
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
  min-width: 0;
  font-size: 0.9rem;
  font-weight: 500;
  line-height: 1.25;
  overflow-wrap: break-word;
  transition: color 300ms ease;
}
.lsec__jump-label b {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 400;
  letter-spacing: 0.1em;
  color: var(--color-accent);
}
.lsec__jump:hover .lsec__jump-label { color: var(--color-text-invert); }
.lsec__cta { padding-block: clamp(2rem, 4vw, 3rem) var(--space-2xl); }

/* --- Grundzustand: Liste (ohne JavaScript) --------------------------------- */
.lsec__bg, .lsec__veil, .lsec__nav { display: none; }
.lsec__inner {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: clamp(2rem, 5vw, 5rem);
  align-items: start;
}
.lsec__slides { list-style: none; margin: 0; padding: 0; display: grid; gap: 2.5rem; }
.lsec__slide { margin: 0; }
/* Der Rahmen ist die Fläche; darin sitzt eine Karte im Seitenverhältnis des
   aktiven Fotos (--lsec-ar). Beim Wechsel verformt sich die Karte fließend
   zum nächsten Format, die Fotos blenden darin über – nichts wird dauerhaft
   abgeschnitten. */
@property --lsec-ar { syntax: "<number>"; inherits: true; initial-value: 1.3333; }
.lsec__frame {
  --fh: min(60vh, 560px);
  --fh: min(60svh, 560px);
  position: relative;
  display: grid;
  width: 100%;
}
.lsec__card {
  position: relative;
  justify-self: end;
  align-self: center;
  width: min(100%, calc(var(--fh) * var(--lsec-ar)));
  aspect-ratio: var(--lsec-ar);
  border-radius: 14px;
  overflow: hidden;
  background: #0e0e11;
  box-shadow: 0 40px 80px -40px rgba(0, 0, 0, 0.85);
}
.lsec__shot { position: absolute; inset: 0; }
.lsec__shot:not(.is-active) { display: none; }
.lsec__shot img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* Zähler auf dem Foto */
.lsec__count {
  position: absolute;
  left: 0.9rem;
  bottom: 0.9rem;
  z-index: 3;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.42rem 0.75rem;
  border-radius: 999px;
  background: rgba(14, 14, 17, 0.72);
  font-family: var(--font-mono);
  font-size: 0.76rem;
  letter-spacing: 0.12em;
  line-height: 1;
  color: rgba(246, 243, 238, 0.72);
}
.lsec__count b { font-weight: 400; color: var(--color-accent); }
.lsec__count i { width: 0.9rem; height: 1px; background: rgba(246, 243, 238, 0.4); }

/* --- Text einer Leistung ---------------------------------------------------- */
.lsec__meta {
  margin: 0 0 1rem;
  display: flex;
  align-items: center;
  gap: 0.9rem;
  font-family: var(--font-mono);
  font-size: 0.76rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(246, 243, 238, 0.7);
}
.lsec__meta span:first-child { color: var(--color-accent); }
.lsec__meta span + span::before {
  content: "";
  display: inline-block;
  width: 1.6rem;
  height: 1px;
  margin-right: 0.9rem;
  vertical-align: middle;
  background: rgba(246, 243, 238, 0.35);
}
.lsec__title {
  font-size: clamp(1.7rem, 1.05rem + 1.9vw, 2.8rem);
  /* lange Wörter wie „Gestaltungstechniken“ dürfen getrennt werden */
  hyphens: auto;
  -webkit-hyphens: auto;
  overflow-wrap: break-word;
  letter-spacing: -0.035em;
  line-height: 1.02;
  text-wrap: balance;
  margin: 0 0 1.1rem;
  max-width: 20ch;
}
.lsec__text {
  font-size: var(--fs-lead);
  line-height: 1.5;
  color: rgba(246, 243, 238, 0.84);
  max-width: 42ch;
  margin: 0 0 1.4rem;
}
.lsec__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  list-style: none;
  margin: 0 0 1.6rem;
  padding: 0;
}
.lsec__tags li {
  margin: 0;
  padding: 0.35rem 0.8rem;
  border-radius: 999px;
  font-size: 0.8rem;
  color: rgba(246, 243, 238, 0.9);
  background: rgba(246, 243, 238, 0.1);
}
.lsec__link { color: var(--color-text-invert); font-size: 1rem; }
.lsec__link::after { background: var(--color-accent); }

/* ==========================================================================
   Bühne (setzt lsec.js mit .is-live)
   ========================================================================== */
.lsec.is-live .lsec__stage {
  height: calc(100vh + var(--n) * 62vh);
  height: calc(100svh + var(--n) * 62svh);
}
.lsec.is-live .lsec__pin {
  position: sticky;
  top: 0;
  height: 100vh;
  height: 100svh;
  overflow: hidden;
  isolation: isolate;
}

/* Hintergrund: Foto der Leistung, weich und eingefärbt ---------------------- */
.lsec.is-live .lsec__bg {
  display: block;
  position: absolute;
  inset: 0;
  z-index: 0;
  /* ruhige Drift mit dem Scrollen über die ganze Bühne */
  transform: translate3d(0, calc((var(--prog, 0) - 0.5) * -4%), 0) scale(1.06);
}
.lsec__bgimg {
  position: absolute;
  inset: -8%;
  width: 116%;
  height: 116%;
  max-width: none;
  object-fit: cover;
  filter: blur(28px) saturate(1.15) brightness(0.72);
  opacity: 0;
  transform: scale(1.12);
  transition: opacity 1600ms cubic-bezier(0.4, 0, 0.2, 1),
              transform 2800ms cubic-bezier(0.16, 1, 0.3, 1);
}
.lsec__bgimg.is-active { opacity: 1; transform: scale(1); }

.lsec.is-live .lsec__veil {
  display: block;
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    /* oben und unten weich in das Schwarz von Einleitung und Buttonzeile */
    linear-gradient(180deg, #16161a 0%, rgba(22, 22, 26, 0) 24%,
                    rgba(22, 22, 26, 0) 68%, #16161a 100%),
    linear-gradient(90deg,
      color-mix(in srgb, var(--lsec-tone) 94%, transparent) 0%,
      color-mix(in srgb, var(--lsec-tone) 82%, transparent) 40%,
      color-mix(in srgb, var(--lsec-tone) 42%, transparent) 100%);
}

/* Inhalt der Bühne ---------------------------------------------------------- */
.lsec.is-live .lsec__inner {
  position: relative;
  z-index: 2;
  height: 100%;
  align-items: center;
  padding-top: calc(var(--header-height) + 1rem);
  padding-bottom: 6.5rem;
}
.lsec.is-live .lsec__slides { display: grid; gap: 0; }
.lsec.is-live .lsec__slide { grid-area: 1 / 1; }
.lsec.is-live .lsec__slide:not(.is-active) { pointer-events: none; }

/* Text: richtungsabhängig, kurze Wege, weiche Kurven ---------------------- */
/* die ganze Textspalte schwebt ruhig mit dem Scrollen */
.lsec.is-live .lsec__slides {
  transform: translate3d(0, calc((0.5 - var(--local, 0.5)) * 10px), 0);
}
.lsec.is-live .lsec__slide > * {
  --d: 0ms;
  opacity: 0;
  transition: opacity 380ms cubic-bezier(0.4, 0, 0.2, 1),
              transform 520ms cubic-bezier(0.4, 0, 0.2, 1);
}
.lsec.is-live .lsec__slide.is-before > * { transform: translateY(-14px); }
.lsec.is-live .lsec__slide.is-after  > * { transform: translateY(18px); }
.lsec.is-live .lsec__slide.is-active > * {
  opacity: 1;
  transform: none;
  transition: opacity 800ms cubic-bezier(0.25, 0.1, 0.25, 1) var(--d),
              transform 1100ms cubic-bezier(0.16, 1, 0.3, 1) var(--d);
}
.lsec.is-live .lsec__slide.is-active > .lsec__meta   { --d: 120ms; }
.lsec.is-live .lsec__slide.is-active > .lsec__text   { --d: 260ms; }
.lsec.is-live .lsec__slide.is-active > .lsec__tags   { --d: 330ms; }
.lsec.is-live .lsec__slide.is-active > .lsec__link   { --d: 400ms; }

/* Titel steigt hinter einer Kante hervor, der alte gleitet nach oben weg */
.lsec__line { display: block; overflow: hidden; padding-bottom: 0.1em; margin-bottom: -0.1em; }
.lsec__line > span { display: block; }
.lsec.is-live .lsec__slide > .lsec__title { transform: none; }
.lsec.is-live .lsec__line > span {
  transform: translate3d(0, 108%, 0);
  transition: transform 560ms cubic-bezier(0.5, 0, 0.75, 0);
}
.lsec.is-live .lsec__slide.is-before .lsec__line > span { transform: translate3d(0, -108%, 0); }
.lsec.is-live .lsec__slide.is-active .lsec__line > span {
  transform: none;
  transition: transform 1150ms cubic-bezier(0.16, 1, 0.3, 1) 140ms;
}

/* Fotos: weiches Überblenden mit leichtem Einzoomen, Karte verformt sich ----- */
.lsec.is-live .lsec__frame {
  height: var(--fh);
  transform: translate3d(0, calc((var(--local, 0.5) - 0.5) * -14px), 0);
}
.lsec.is-live .lsec__shot {
  display: block;
  opacity: 0;
  transition: opacity 700ms cubic-bezier(0.4, 0, 0.2, 1);
}
.lsec.is-live .lsec__shot img {
  transform: scale(1.08);
  transition: transform 1800ms cubic-bezier(0.16, 1, 0.3, 1);
}
.lsec.is-live .lsec__shot.is-before img { transform: scale(1.03) translate3d(0, -2%, 0); }
.lsec.is-live .lsec__shot.is-after img  { transform: scale(1.08) translate3d(0, 3%, 0); }
.lsec.is-live .lsec__shot.is-active {
  z-index: 1;
  opacity: 1;
  transition: opacity 950ms cubic-bezier(0.25, 0.1, 0.25, 1) 80ms;
}
.lsec.is-live .lsec__shot.is-active img { transform: none; }

/* Leiste am unteren Rand: füllt sich stufenlos mit dem Scrollen ------------ */
.lsec.is-live .lsec__nav {
  display: block;
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 3;
  padding-bottom: 1.6rem;
}
.lsec__nav ol {
  list-style: none;
  margin-block: 0;
  display: grid;
  grid-template-columns: repeat(var(--n), minmax(0, 1fr));
  gap: 0.75rem;
}
.lsec__nav li { margin: 0; }
.lsec__nav button {
  width: 100%;
  padding: 0.6rem 0 0;
  border: 0;
  background: none;
  color: rgba(246, 243, 238, 0.55);
  font: inherit;
  font-size: 0.78rem;
  text-align: left;
  cursor: pointer;
  display: flex;
  flex-direction: column-reverse;
  gap: 0.6rem;
  transition: color 300ms ease;
}
.lsec__nav button:hover,
.lsec__nav button[aria-current="true"] { color: var(--color-text-invert); }
.lsec__nav button:focus-visible { outline: 2px solid var(--color-accent); outline-offset: 4px; }
.lsec__nav i {
  display: block;
  height: 2px;
  border-radius: 2px;
  background: rgba(246, 243, 238, 0.2);
  overflow: hidden;
}
.lsec__nav b {
  display: block;
  height: 100%;
  background: var(--color-accent);
  transform-origin: left center;
  transform: scaleX(var(--fill, 0));
  transition: transform 450ms cubic-bezier(0.16, 1, 0.3, 1);
}
.lsec__nav button[aria-current="true"] b { transition: none; }

@media (prefers-reduced-motion: reduce) {
  .lsec.is-live .lsec__bg,
  .lsec.is-live .lsec__frame { transform: none !important; }
  .lsec.is-live .lsec__slides,
  .lsec.is-live .lsec__slide > *,
  .lsec.is-live .lsec__line > span,
  .lsec.is-live .lsec__shot img { transform: none !important; }
}

/* ==========================================================================
   Meisterbetrieb (Startseite): Meistersiegel und vier Grundsätze
   ========================================================================== */
.meister__top {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  gap: clamp(2rem, 6vw, 6rem);
  align-items: center;
}
.meister__text { display: grid; gap: 1.25rem; justify-items: start; }
.meister__text .lead { max-width: 46ch; margin: 0; }
.meister__text p { margin: 0; }

.siegel {
  margin: 0;
  justify-self: center;
  width: min(100%, 340px);
  filter: drop-shadow(0 30px 40px rgba(22, 22, 26, 0.22));
}
.siegel svg { display: block; width: 100%; height: auto; overflow: visible; }
.siegel__grund { fill: var(--color-brand-primary); }
.siegel__linie { fill: none; stroke: var(--color-accent); stroke-width: 1; opacity: 0.55; }
.siegel__linie--innen { opacity: 0.3; }
.siegel__schrift {
  fill: var(--color-accent);
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: 3px;
}
.siegel__jahr {
  fill: rgba(246, 243, 238, 0.7);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 4px;
}
/* die Schrift um das Zeichen dreht sich langsam (animateTransform im SVG) */

.grundsaetze {
  list-style: none;
  margin: clamp(3rem, 6vw, 4.5rem) 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: clamp(1.25rem, 3vw, 2.5rem);
}
.grundsaetze li {
  position: relative;
  margin: 0;
  padding-top: 1.35rem;
  border-top: 1px solid var(--color-border-strong);
}
/* goldener Strich wird beim Erscheinen aufgetragen */
.grundsaetze li::before {
  content: "";
  position: absolute;
  top: -2px;
  left: 0;
  width: 56px;
  height: 3px;
  background: var(--color-accent);
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 900ms cubic-bezier(0.16, 1, 0.3, 1) calc(var(--reveal-delay, 0ms) + 200ms);
}
.grundsaetze li.is-visible::before { transform: scaleX(1); }
.grundsaetze h3 { font-size: 1.15rem; margin: 0 0 0.45rem; }
.grundsaetze p { margin: 0; font-size: 0.95rem; color: var(--color-muted); }

@media (prefers-reduced-motion: reduce) {
  .grundsaetze li::before { transform: scaleX(1); transition: none; }
}
