:root {
  --rose: #d4afa4;
  --rose-deep: #b68e84;
  --text: #655f60;
  --white: #ffffff;
  --panel-mobile: rgba(255, 255, 255, 0.88);
  --panel-desktop: rgba(255, 255, 255, 0.94);
  --shadow: 0 18px 60px rgba(70, 54, 50, 0.16);
  --radius: 28px;
}

* { box-sizing: border-box; }
html { min-height: 100%; background: #f5efed; }
body {
  min-height: 100vh;
  margin: 0;
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

a { color: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }

.background,
.desktop-background {
  position: fixed;
  inset: 0;
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
  pointer-events: none;
}

.desktop-background {
  background-image: linear-gradient(rgba(255,255,255,.18), rgba(255,255,255,.18)), url("assets/bg-desktop.webp");
  opacity: 1;
}

.background { display: none; }

.page-shell {
  position: relative;
  z-index: 2;
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 42px 24px;
}

.contact-card {
  width: min(430px, calc(100vw - 40px));
  min-height: min(790px, calc(100vh - 64px));
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 34px 40px 24px;
  background: var(--panel-desktop);
  border: 1px solid rgba(255,255,255,.72);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  backdrop-filter: blur(7px);
  -webkit-backdrop-filter: blur(7px);
}

.brand {
  display: flex;
  justify-content: center;
  margin: 0 0 22px;
}

.brand__logo {
  display: block;
  width: min(250px, 76%);
  height: auto;
  object-fit: contain;
}

.button-groups { width: 100%; }
.link-group { display: grid; gap: 10px; }
.link-group--spaced { margin-top: 22px; }

.link-button {
  position: relative;
  min-height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 10px 18px;
  border: 1.5px solid var(--rose);
  border-radius: 14px;
  background: rgba(255,255,255,.22);
  color: var(--text);
  text-decoration: none;
  font-size: 15px;
  font-weight: 560;
  letter-spacing: .01em;
  transition: transform .15s ease, background-color .15s ease, border-color .15s ease, box-shadow .15s ease;
}

.link-button:hover,
.link-button:focus-visible {
  border-color: var(--rose-deep);
  background: rgba(255,255,255,.72);
  box-shadow: 0 7px 18px rgba(111,86,80,.10);
  transform: translateY(-1px);
  outline: none;
}

.link-button:active { transform: translateY(0) scale(.99); }
.link-button[data-pending="true"] { cursor: default; }

.icon {
  width: 21px;
  height: 21px;
  display: inline-grid;
  place-items: center;
  color: var(--rose);
  flex: 0 0 21px;
}
.icon svg {
  width: 100%;
  height: 100%;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.icon svg .fill { fill: currentColor; stroke: none; }

.legal-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin-top: 26px;
  font-size: 11px;
  line-height: 1.5;
  color: #888182;
}
.legal-links a {
  text-decoration: none;
  border-bottom: 1px solid transparent;
}
.legal-links a:hover,
.legal-links a:focus-visible { border-bottom-color: currentColor; outline: none; }

.side-switch { display: none; }

/* Mobile: QR-Visitenkarte mit umschaltbarer Seite */
@media (max-width: 700px) {
  body { min-height: 100svh; background: #f2e5e1; }
  .desktop-background { display: none; }

  .background {
    display: block;
    opacity: 0;
    transition: opacity .28s ease;
    background-position: center center;
  }
  .background--right { background-image: url("assets/bg-right.webp"); }
  .background--left { background-image: url("assets/bg-left.webp"); }
  body.side-right .background--right { opacity: 1; }
  body.side-left .background--left { opacity: 1; }

  .page-shell {
    min-height: 100svh;
    place-items: stretch;
    padding: 0;
  }

  .contact-card {
    width: 59vw;
    min-width: 218px;
    max-width: 292px;
    min-height: 100svh;
    margin: 0;
    padding: max(24px, env(safe-area-inset-top)) 14px max(72px, calc(env(safe-area-inset-bottom) + 58px));
    justify-content: flex-start;
    border-radius: 0;
    border: 0;
    box-shadow: none;
    background: var(--panel-mobile);
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
    transition: margin .28s ease;
  }

  body.side-right .contact-card { margin-left: auto; margin-right: 0; }
  body.side-left .contact-card { margin-left: 0; margin-right: auto; }

  .brand { margin: 0 0 18px; }
  .brand__logo { width: min(180px, 92%); }

  .link-group { gap: 8px; }
  .link-group--spaced { margin-top: 17px; }

  .link-button {
    min-height: 46px;
    gap: 9px;
    padding: 8px 10px;
    border-radius: 12px;
    background: rgba(255,255,255,.16);
    font-size: 14px;
  }
  .icon { width: 19px; height: 19px; flex-basis: 19px; }

  .legal-links {
    margin-top: 22px;
    gap: 5px;
    font-size: 9.5px;
  }

  .side-switch {
    position: fixed;
    z-index: 5;
    bottom: max(14px, env(safe-area-inset-bottom));
    display: inline-flex;
    align-items: center;
    gap: 6px;
    height: 38px;
    padding: 0 13px;
    border: 1px solid rgba(212,175,164,.92);
    border-radius: 999px;
    background: rgba(255,255,255,.82);
    color: #8a7772;
    box-shadow: 0 7px 20px rgba(82,62,57,.10);
    backdrop-filter: blur(7px);
    -webkit-backdrop-filter: blur(7px);
    font: 600 11px/1 system-ui, sans-serif;
    letter-spacing: .04em;
    cursor: pointer;
  }
  .side-switch--to-left { left: 14px; }
  .side-switch--to-right { right: 14px; }
  body.side-right .side-switch--to-right { display: none; }
  body.side-left .side-switch--to-left { display: none; }
}

@media (max-width: 370px) {
  .contact-card { width: 62vw; min-width: 206px; padding-inline: 11px; }
  .link-button { font-size: 13px; }
  .brand__logo { width: 165px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; }
}
