/* ==========================================================================
   LR-Websites – gemeinsame Basis für alle Demo-Konzepte
   ---------------------------------------------------------------------
   Enthält nur, was alle drei Demos teilen: Reset, Demo-Hinweisleiste,
   mobile Navigation, Hinweis-Dialog für illustrative Funktionen und den
   LR-Websites-Abschnitt im Footer. Farben, Schriften und Layout jeder
   Demo stehen in der jeweiligen Datei (barber.css, restaurant.css, …)
   und werden über die Variablen unten gesteuert.
   ========================================================================== */

:root {
  --d-bg: #ffffff;
  --d-surface: #f5f5f5;
  --d-ink: #111111;
  --d-ink-soft: #555555;
  --d-line: rgba(0, 0, 0, 0.1);
  --d-accent: #333333;
  --d-on-accent: #ffffff;
  --d-font-body: system-ui, sans-serif;
  --d-font-display: var(--d-font-body);
  --d-radius: 8px;
  --d-max: 1160px;
  --d-ease: cubic-bezier(0.22, 1, 0.36, 1);
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 7rem;
}

body {
  margin: 0;
  font-family: var(--d-font-body);
  font-size: 16px;
  line-height: 1.6;
  background: var(--d-bg);
  color: var(--d-ink);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  overflow-x: clip; /* «clip» erhält position: sticky */
}

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

a {
  color: inherit;
}

h1,
h2,
h3,
p,
ul,
ol,
dl,
dd,
figure {
  margin: 0;
}

ul,
ol {
  padding: 0;
  list-style: none;
}

button {
  font: inherit;
  cursor: pointer;
}

:focus-visible {
  outline: 2px solid var(--d-accent);
  outline-offset: 3px;
}

[data-lang-block][hidden] {
  display: none !important;
}

.d-container {
  width: 100%;
  max-width: var(--d-max);
  margin-inline: auto;
  padding-inline: 1.5rem;
}

.d-skip {
  position: absolute;
  left: -999px;
  top: 0;
  z-index: 300;
  padding: 0.6rem 1rem;
  background: var(--d-accent);
  color: var(--d-on-accent);
}

.d-skip:focus {
  left: 0;
}

/* --------------------------------------------------------------------------
   Demo-Hinweisleiste (immer sichtbar, neutral – gehört zu LR-Websites,
   nicht zur fiktiven Firma)
   -------------------------------------------------------------------------- */

.demo-bar {
  position: relative;
  z-index: 120;
  background: #0b0d0f;
  color: #e8ecea;
  font-family: "Inter", system-ui, sans-serif;
  font-size: 0.8rem;
  line-height: 1.3;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.demo-bar__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem 1.25rem;
  padding-block: 0.55rem;
  flex-wrap: wrap;
}

.demo-bar__label {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  min-width: 0;
}

.demo-bar__label strong {
  font-weight: 600;
  letter-spacing: 0.01em;
}

.demo-bar__label span {
  color: #9aa5ab;
}

.demo-bar__dot {
  flex: 0 0 auto;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #6fd3bf;
}

.demo-bar__actions {
  display: flex;
  align-items: center;
  gap: 0.9rem;
}

.demo-bar__lang {
  display: flex;
  gap: 2px;
  padding: 2px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 999px;
}

.demo-bar__lang a {
  padding: 0.15rem 0.55rem;
  border-radius: 999px;
  color: #9aa5ab;
  text-decoration: none;
  font-weight: 600;
  transition: color 200ms, background 200ms;
}

.demo-bar__lang a.is-active {
  background: #e8ecea;
  color: #0b0d0f;
}

.demo-bar__back {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  color: #e8ecea;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
}

.demo-bar__back:hover {
  color: #6fd3bf;
}

.demo-bar__back::before {
  content: "←";
  transition: transform 220ms var(--d-ease);
}

.demo-bar__back:hover::before {
  transform: translateX(-3px);
}

@media (max-width: 640px) {
  .demo-bar__label span {
    display: none;
  }
}

/* --------------------------------------------------------------------------
   Header & Navigation (Grundgerüst; Optik pro Demo)
   -------------------------------------------------------------------------- */

.d-header {
  position: sticky;
  top: 0;
  z-index: 100;
}

.d-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  min-height: 72px;
}

.d-brand {
  text-decoration: none;
  white-space: nowrap;
}

.d-nav {
  display: flex;
  align-items: center;
  gap: 2rem;
}

.d-nav__links {
  display: flex;
  gap: 1.75rem;
}

.d-nav__links a {
  position: relative;
  text-decoration: none;
  font-size: 0.95rem;
  padding-block: 0.25rem;
}

.d-nav__links a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -2px;
  height: 1px;
  background: currentColor;
  transform: scaleX(0);
  transition: transform 240ms var(--d-ease);
}

.d-nav__links a:hover::after {
  transform: scaleX(1);
}

.d-menu-toggle {
  display: none;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid var(--d-line);
  border-radius: var(--d-radius);
  background: transparent;
  color: inherit;
}

.d-menu-toggle span {
  display: block;
  width: 18px;
  height: 1.5px;
  margin: 4px auto;
  background: currentColor;
  transition: transform 220ms, opacity 220ms;
}

.d-menu-toggle[aria-expanded="true"] span:nth-child(1) {
  transform: translateY(5.5px) rotate(45deg);
}

.d-menu-toggle[aria-expanded="true"] span:nth-child(2) {
  opacity: 0;
}

.d-menu-toggle[aria-expanded="true"] span:nth-child(3) {
  transform: translateY(-5.5px) rotate(-45deg);
}

@media (max-width: 900px) {
  .d-menu-toggle {
    display: block;
  }

  .d-nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 1rem;
    padding: 1rem 1.5rem 1.5rem;
    background: var(--d-bg);
    border-bottom: 1px solid var(--d-line);
    box-shadow: 0 20px 40px -20px rgba(0, 0, 0, 0.35);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-6px);
    transition: opacity 220ms, transform 220ms, visibility 220ms;
  }

  .d-nav.is-open {
    opacity: 1;
    visibility: visible;
    transform: none;
  }

  .d-nav__links {
    flex-direction: column;
    gap: 0;
  }

  .d-nav__links a {
    display: block;
    padding: 0.85rem 0;
    font-size: 1.1rem;
    border-bottom: 1px solid var(--d-line);
  }

  .d-nav__links a::after {
    display: none;
  }

  .d-nav .d-btn {
    width: 100%;
  }
}

/* --------------------------------------------------------------------------
   Buttons (Grundform; Farben pro Demo)
   -------------------------------------------------------------------------- */

.d-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 48px;
  padding: 0.8rem 1.5rem;
  border: 1px solid transparent;
  border-radius: var(--d-radius);
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
  white-space: nowrap;
  transition: background 220ms, color 220ms, border-color 220ms, transform 220ms var(--d-ease);
}

.d-btn:hover {
  transform: translateY(-1px);
}

.d-btn:active {
  transform: scale(0.98);
}

.d-btn--solid {
  background: var(--d-accent);
  color: var(--d-on-accent);
}

.d-btn--ghost {
  border-color: currentColor;
  background: transparent;
}

/* Kleines Kennzeichen an Elementen mit illustrativer Funktion */
.d-demo-flag {
  display: inline-block;
  margin-left: 0.15rem;
  padding: 0.05rem 0.4rem;
  border-radius: 999px;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  background: rgba(127, 127, 127, 0.18);
  vertical-align: 0.15em;
}

/* --------------------------------------------------------------------------
   Hinweis-Dialog (für Buchung, Reservation, Offerte, Anruf …)
   -------------------------------------------------------------------------- */

.demo-dialog {
  width: min(460px, calc(100vw - 2rem));
  padding: 0;
  border: none;
  border-radius: 14px;
  background: #101315;
  color: #e8ecea;
  font-family: "Inter", system-ui, sans-serif;
  box-shadow: 0 30px 80px -20px rgba(0, 0, 0, 0.7);
}

.demo-dialog::backdrop {
  background: rgba(5, 7, 9, 0.6);
  backdrop-filter: blur(3px);
}

.demo-dialog[open] {
  animation: demo-dialog-in 260ms var(--d-ease);
}

.demo-dialog__body {
  padding: 1.75rem 1.5rem 1.5rem;
}

.demo-dialog__tag {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  margin-bottom: 0.9rem;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #6fd3bf;
}

.demo-dialog__tag::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
}

.demo-dialog h2 {
  margin-bottom: 0.6rem;
  font-size: 1.3rem;
  line-height: 1.25;
}

.demo-dialog p {
  color: #a3abb0;
  font-size: 0.95rem;
}

.demo-dialog__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-top: 1.4rem;
}

.demo-dialog__actions a,
.demo-dialog__actions button {
  flex: 1 1 auto;
  min-height: 46px;
  padding: 0.7rem 1rem;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.9rem;
  text-align: center;
  text-decoration: none;
}

.demo-dialog__actions a {
  background: #3bb39c;
  color: #04130f;
}

.demo-dialog__actions button {
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: transparent;
  color: #e8ecea;
}

@keyframes demo-dialog-in {
  from {
    opacity: 0;
    transform: translateY(10px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

/* --------------------------------------------------------------------------
   LR-Websites-Abschnitt am Seitenende
   -------------------------------------------------------------------------- */

.demo-credit {
  background: #0b0d0f;
  color: #c9d0d3;
  font-family: "Inter", system-ui, sans-serif;
  font-size: 0.88rem;
}

.demo-credit__inner {
  display: grid;
  gap: 1.5rem;
  padding-block: 2.5rem;
}

@media (min-width: 800px) {
  .demo-credit__inner {
    grid-template-columns: 1.5fr auto;
    align-items: center;
  }
}

.demo-credit h2 {
  margin-bottom: 0.4rem;
  font-size: 1.05rem;
  color: #ffffff;
}

.demo-credit p + p {
  margin-top: 0.4rem;
}

.demo-credit__small {
  color: #7d878c;
  font-size: 0.78rem;
}

.demo-credit__small a {
  color: #9aa5ab;
}

.demo-credit__cta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}

.demo-credit__cta a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0.7rem 1.3rem;
  border-radius: 999px;
  font-weight: 600;
  text-decoration: none;
  transition: transform 220ms var(--d-ease), background 220ms;
}

.demo-credit__cta a:first-child {
  background: #3bb39c;
  color: #04130f;
}

.demo-credit__cta a:last-child {
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #e8ecea;
}

.demo-credit__cta a:hover {
  transform: translateY(-1px);
}

@media (max-width: 520px) {
  .demo-credit__cta a {
    flex: 1 1 100%;
  }
}

/* --------------------------------------------------------------------------
   Dezentes Einblenden (nur mit JS aktiv, respektiert reduced motion)
   -------------------------------------------------------------------------- */

.js .d-reveal {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 600ms var(--d-ease), transform 600ms var(--d-ease);
}

.js .d-reveal.is-visible {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    transition-duration: 1ms !important;
    animation-duration: 1ms !important;
  }

  .js .d-reveal {
    opacity: 1;
    transform: none;
  }
}

/* ==========================================================================
   Bewegungssystem (v61)
   ---------------------------------------------------------------------
   Drei Bausteine, sonst nichts:
   1. Hero-Einstieg beim Laden (.d-hero-in, nur CSS → läuft auch ohne JS)
   2. Einblenden beim Scrollen (.d-reveal, .d-mask; nur mit .js)
   3. Rückmeldung bei Interaktion (Chips, Buttons, Bildansicht)
   Bei «reduzierter Bewegung» ist alles sofort sichtbar und statisch.
   ========================================================================== */

@media (prefers-reduced-motion: no-preference) {
  .d-hero-in > * {
    animation: d-rise 900ms var(--d-ease) both;
    animation-delay: calc(var(--d-i, 0) * 90ms + 120ms);
  }

  .js [data-stagger] > .d-reveal,
  .js [data-stagger] .d-mask {
    transition-delay: calc(var(--d-i, 0) * 80ms);
  }

  /* Bild-Maske: Bild «öffnet» sich von unten und setzt sich leicht.
     Die Maske liegt auf den KINDERN von .d-mask – der Container selbst
     bleibt unbeschnitten, sonst meldet der IntersectionObserver in Chrome
     nie «sichtbar» (vollständig per clip-path verdecktes Ziel) und die
     Bilder blieben dauerhaft unsichtbar. */
  .js .d-mask > * {
    clip-path: inset(0 0 100% 0);
    transition: clip-path 1000ms var(--d-ease);
    transition-delay: inherit;
  }

  .js .d-mask img {
    transform: scale(1.08);
    transition: transform 1400ms var(--d-ease), clip-path 1000ms var(--d-ease);
  }

  .js .d-mask.is-visible > * {
    clip-path: inset(0 0 0 0);
  }

  .js .d-mask.is-visible img {
    transform: none;
  }
}

@keyframes d-rise {
  from {
    opacity: 0;
    transform: translateY(22px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes d-fade {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes d-settle {
  from {
    transform: scale(1.1);
  }
  to {
    transform: scale(1);
  }
}

/* Aktiver Abschnitt in der Navigation */
.d-nav__links a[aria-current="true"]::after {
  transform: scaleX(1);
}

/* --------------------------------------------------------------------------
   Auswahl-Widgets (Termin, Reservation) – rein illustrativ
   -------------------------------------------------------------------------- */

.d-step {
  margin: 0 0 1.5rem;
  padding: 0;
  border: 0;
  min-width: 0;
}

.d-step legend {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 0.75rem;
  padding: 0;
  font-weight: 600;
}

.d-step__num {
  display: inline-grid;
  place-items: center;
  width: 1.6rem;
  height: 1.6rem;
  border: 1px solid currentColor;
  border-radius: 50%;
  font-size: 0.75rem;
  opacity: 0.7;
}

.d-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.d-chip {
  position: relative;
  display: inline-flex;
  flex-direction: column;
  justify-content: center;
  min-height: 44px;
  padding: 0.55rem 0.95rem;
  border: 1px solid var(--d-line);
  border-radius: var(--d-radius);
  cursor: pointer;
  line-height: 1.25;
  transition: border-color 200ms, background 200ms, color 200ms, transform 200ms var(--d-ease);
}

.d-chip input {
  position: absolute;
  inset: 0;
  opacity: 0;
  margin: 0;
  cursor: pointer;
}

.d-chip small {
  font-size: 0.75rem;
  opacity: 0.7;
}

.d-chip:hover {
  border-color: currentColor;
}

.d-chip:has(input:checked) {
  border-color: var(--d-accent);
  background: var(--d-accent);
  color: var(--d-on-accent);
}

.d-chip:has(input:focus-visible) {
  outline: 2px solid var(--d-accent);
  outline-offset: 3px;
}

.d-chip:active {
  transform: scale(0.97);
}

.d-stepper {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--d-line);
  border-radius: var(--d-radius);
}

.d-stepper button {
  width: 46px;
  height: 46px;
  border: 0;
  background: transparent;
  color: inherit;
  font-size: 1.3rem;
}

.d-stepper button:disabled {
  opacity: 0.3;
  cursor: default;
}

.d-stepper output {
  min-width: 2.5rem;
  text-align: center;
  font-weight: 700;
  font-size: 1.1rem;
}

.d-summary-box {
  display: grid;
  gap: 0.9rem;
  margin-top: 0.5rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--d-line);
}

.d-summary {
  min-height: 1.5em;
  font-weight: 600;
}

.d-widget-note {
  font-size: 0.82rem;
  opacity: 0.75;
}

.demo-dialog__summary {
  margin-top: 0.9rem;
  padding: 0.75rem 0.9rem;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.06);
  color: #e8ecea !important;
  font-size: 0.9rem;
}

/* --------------------------------------------------------------------------
   Bildansicht (Lightbox)
   -------------------------------------------------------------------------- */

.d-zoom {
  display: block;
  width: 100%;
  height: 100%;
  padding: 0;
  border: 0;
  background: none;
  cursor: zoom-in;
}

.d-zoom:focus-visible {
  outline-offset: -4px;
}

.d-lightbox {
  width: 100vw;
  max-width: 100vw;
  height: 100vh;
  max-height: 100vh;
  margin: 0;
  padding: 0;
  border: 0;
  background: rgba(5, 5, 5, 0.94);
  color: #f0ece4;
}

.d-lightbox::backdrop {
  background: rgba(5, 5, 5, 0.7);
}

.d-lightbox[open] {
  display: grid;
  place-items: center;
}

.d-lightbox__figure {
  display: grid;
  gap: 0.75rem;
  max-width: min(1100px, 92vw);
  margin: 0;
}

.d-lightbox__figure img {
  max-height: 78vh;
  width: auto;
  margin-inline: auto;
  object-fit: contain;
  opacity: 0;
  transition: opacity 320ms ease;
}

.d-lightbox__figure img.is-in {
  opacity: 1;
}

.d-lightbox figcaption {
  font-family: "Inter", system-ui, sans-serif;
  font-size: 0.85rem;
  text-align: center;
  color: #b9b2a6;
}

.d-lightbox__count {
  margin-left: 0.75rem;
  opacity: 0.7;
}

.d-lightbox__btn {
  position: absolute;
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border: 1px solid rgba(240, 236, 228, 0.25);
  border-radius: 50%;
  background: rgba(20, 20, 20, 0.6);
  color: inherit;
  font-size: 1.6rem;
  line-height: 1;
  transition: background 200ms, border-color 200ms;
}

.d-lightbox__btn:hover {
  border-color: currentColor;
  background: rgba(40, 40, 40, 0.8);
}

.d-lightbox__prev {
  left: 1rem;
  top: 50%;
  transform: translateY(-50%);
}

.d-lightbox__next {
  right: 1rem;
  top: 50%;
  transform: translateY(-50%);
}

.d-lightbox__close {
  top: 1rem;
  right: 1rem;
}

@media (max-width: 600px) {
  .d-lightbox__prev,
  .d-lightbox__next {
    top: auto;
    bottom: 1.25rem;
    transform: none;
  }
}

.d-hero-in > :nth-child(2) { --d-i: 1; }
.d-hero-in > :nth-child(3) { --d-i: 2; }
.d-hero-in > :nth-child(4) { --d-i: 3; }
.d-hero-in > :nth-child(5) { --d-i: 4; }
.d-hero-in > :nth-child(6) { --d-i: 5; }

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Ohne JavaScript: mobile Navigation statisch anzeigen statt im
   (nicht öffnbaren) Klappmenü zu verstecken. */
@media (max-width: 900px) {
  html:not(.js) .d-menu-toggle {
    display: none;
  }

  html:not(.js) .d-header__inner {
    flex-wrap: wrap;
  }

  html:not(.js) .d-nav {
    position: static;
    width: 100%;
    padding: 0 0 1rem;
    border: 0;
    box-shadow: none;
    opacity: 1;
    visibility: visible;
    transform: none;
  }

  html:not(.js) .d-nav__links {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 0.25rem 1.25rem;
  }

  html:not(.js) .d-nav__links a {
    padding: 0.4rem 0;
    border: 0;
    font-size: 0.95rem;
  }
}
