* { box-sizing: border-box; }

:root {
  --page-bg: #f4f3f1;
  --card-bg: #ffffff;
  --text-primary: #1a1a1a;
  --text-secondary: #555555;
  --text-muted: #666666;
  --text-faint: #999999;
  --border-color: #e2dfd8;
  --fallback-bg: #eeece7;
}

:root[data-theme="dark"] {
  --page-bg: #16161a;
  --card-bg: #222226;
  --text-primary: #f0f0f0;
  --text-secondary: #b8b8c0;
  --text-muted: #a0a0a8;
  --text-faint: #82828c;
  --border-color: #34343a;
  --fallback-bg: #2b2b30;
}

body {
  margin: 0;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background: var(--page-bg);
  color: var(--text-primary);
  transition: background 0.2s ease, color 0.2s ease;
}

.page {
  max-width: 480px;
  margin: 0 auto;
  padding: 0 16px 64px;
}

.banner {
  height: 96px;
  margin: 0 -16px;
  background: linear-gradient(135deg, var(--accent, #7f77dd), color-mix(in srgb, var(--accent, #7f77dd) 60%, #fff));
  border-radius: 0 0 24px 24px;
}

.profile-header {
  text-align: center;
  margin-top: -40px;
  margin-bottom: 24px;
}

.avatar {
  width: 84px;
  height: 84px;
  border-radius: 50%;
  object-fit: cover;
  border: 4px solid var(--page-bg);
  box-shadow: 0 2px 8px rgba(0,0,0,0.12);
  display: block;
  margin: 0 auto 12px;
}

.avatar-fallback {
  background: var(--accent, #7f77dd);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 32px;
  font-weight: 600;
}

.profile-header h1 {
  font-size: 20px;
  font-weight: 700;
  margin: 0 0 2px;
}

.handle {
  font-size: 13px;
  color: var(--accent, #7f77dd);
  font-weight: 600;
  margin: 0 0 10px;
}

.bio {
  font-size: 14px;
  color: var(--text-secondary);
  margin: 0;
  line-height: 1.5;
}

.grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  align-items: start;
}

.span-1 { grid-column: span 1; }
.span-2 { grid-column: span 2; }

.block {
  border-radius: 14px;
  padding: 14px;
  text-decoration: none;
  color: inherit;
  opacity: 0;
  animation: rise 0.5s ease forwards;
}

@keyframes rise {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

.block-link-group {
  background: var(--card-bg);
  border: 1.5px solid var(--accent, #7f77dd);
  padding: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.link-item {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--accent, #7f77dd);
  font-weight: 600;
  font-size: 14px;
  text-align: center;
  justify-content: center;
  min-height: 48px;
  padding: 12px 16px;
  text-decoration: none;
  transition: background 0.15s ease;
}
.link-item:not(:last-child) {
  border-bottom: 1px solid color-mix(in srgb, var(--accent, #7f77dd) 25%, transparent);
}
.link-item:hover {
  background: color-mix(in srgb, var(--accent, #7f77dd) 6%, var(--card-bg));
}

.link-title {
  flex: 1;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.link-arrow { opacity: 0.5; font-size: 15px; }

.block-text {
  background: var(--card-bg);
  box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}
.block-text h3 {
  margin: 0 0 6px;
  font-size: 15px;
  font-weight: 600;
}
.block-text p {
  margin: 0;
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.5;
}

.block-image {
  background: var(--card-bg);
  padding: 0;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}
.block-image img {
  width: 100%;
  display: block;
  transition: transform 0.3s ease;
}
.block-image:hover img { transform: scale(1.03); }

.block-social {
  background: transparent;
  padding: 0;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: center;
}
.social-pill {
  display: flex;
  align-items: center;
  gap: 6px;
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: 999px;
  padding: 8px 14px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
  text-decoration: none;
  transition: border-color 0.15s ease, transform 0.15s ease;
}
.social-pill:hover {
  border-color: var(--accent, #7f77dd);
  color: var(--accent, #7f77dd);
  transform: translateY(-2px);
}
.social-pill i { font-size: 16px; }

.block-product {
  background: var(--card-bg);
  display: flex;
  flex-direction: column;
  gap: 8px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.04);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.block-product:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(0,0,0,0.08);
}
.product-img-wrap {
  position: relative;
  border-radius: 10px;
  overflow: hidden;
  flex-shrink: 0;
}
.product-img-wrap img {
  width: 100%;
  display: block;
}
.product-badge {
  position: absolute;
  bottom: 8px;
  right: 8px;
  background: var(--accent, #7f77dd);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  padding: 4px 8px;
  border-radius: 999px;
}
.product-info {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}
.product-title {
  font-size: 13px;
  font-weight: 600;
  text-align: center;
}
.product-description {
  display: none;
  margin: 0;
  font-size: 12px;
  color: var(--text-secondary);
  line-height: 1.4;
  overflow: hidden;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}
.product-price {
  display: none;
}

/* Volle Breite: Bild links, Titel/Beschreibung/Preis rechts */
.block-product.span-2 {
  flex-direction: row;
  align-items: center;
  gap: 14px;
}
.block-product.span-2 .product-img-wrap {
  width: 92px;
  height: 92px;
}
.block-product.span-2 .product-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.block-product.span-2 .product-title {
  text-align: left;
}
.block-product.span-2 .product-description {
  display: -webkit-box;
}
.block-product.span-2 .product-price {
  display: inline-block;
  font-size: 13px;
  font-weight: 700;
  color: var(--accent, #7f77dd);
  margin-top: 2px;
}

.block-divider {
  background: transparent;
  padding: 4px 0;
  display: flex;
  align-items: center;
  gap: 10px;
  animation: none;
  opacity: 1;
}
.divider-line {
  flex: 1;
  height: 1px;
  background: var(--border-color);
}
.block-divider i {
  color: var(--accent, #7f77dd);
  font-size: 14px;
}

.block-gallery {
  background: transparent;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  grid-auto-rows: 84px;
  grid-auto-flow: dense;
  gap: 6px;
}
.gallery-item {
  border: none;
  padding: 0;
  border-radius: 10px;
  overflow: hidden;
  cursor: pointer;
  background: var(--card-bg);
  grid-column: span 1;
  grid-row: span 2;
}
.gallery-item.gi-wide { grid-column: span 2; grid-row: span 2; }
.gallery-item.gi-tall { grid-column: span 1; grid-row: span 3; }
.gallery-item.gi-square { grid-column: span 1; grid-row: span 2; }
.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.2s ease;
}
.gallery-item:hover img { transform: scale(1.06); }
.gallery-item:focus-visible {
  outline: 2px solid var(--accent, #7f77dd);
  outline-offset: 2px;
}

.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.85);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  z-index: 100;
  padding: 24px;
}
.lightbox[hidden] { display: none; }
.lightbox img {
  max-width: 100%;
  max-height: 100%;
  border-radius: 8px;
  min-width: 0;
}
.lightbox-close {
  position: absolute;
  top: 16px;
  right: 16px;
  background: rgba(255,255,255,0.15);
  border: none;
  color: #fff;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  font-size: 18px;
  cursor: pointer;
}

.lightbox-nav {
  background: rgba(255,255,255,0.15);
  border: none;
  color: #fff;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  font-size: 22px;
  cursor: pointer;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}
.lightbox-nav:hover { background: rgba(255,255,255,0.28); }

.img-fallback {
  width: 100%;
  height: 100%;
  min-height: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--fallback-bg);
  color: var(--text-faint);
  font-size: 20px;
  border-radius: inherit;
}

@media (max-width: 380px) {
  .block-gallery {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-auto-rows: 100px;
  }
}

.block-audio {
  background: var(--card-bg);
  box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}
.audio-title {
  margin: 0 0 8px;
  font-size: 13px;
  font-weight: 600;
}
.block-audio iframe {
  width: 100%;
  height: 152px;
  border: none;
  border-radius: 12px;
  display: block;
}

.block-team {
  background: transparent;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(90px, 1fr));
  gap: 10px;
}
.team-member {
  background: var(--card-bg);
  border-radius: 12px;
  padding: 14px 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 4px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}
.team-photo {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  object-fit: cover;
}
.team-photo-fallback {
  background: var(--accent, #7f77dd);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 20px;
}
.team-name {
  font-size: 12px;
  font-weight: 600;
}
.team-role {
  font-size: 11px;
  color: var(--text-faint);
}

.block-newsletter {
  background: var(--card-bg);
  box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}
.block-newsletter h3 {
  margin: 0 0 6px;
  font-size: 15px;
  font-weight: 600;
}
.block-newsletter p {
  margin: 0 0 12px;
  font-size: 13px;
  color: var(--text-secondary);
}
.newsletter-form {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.newsletter-form[hidden] {
  display: none;
}
.newsletter-form input[type="email"],
.contact-form input[type="text"],
.contact-form input[type="email"],
.contact-form textarea {
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 10px 12px;
  font-size: 14px;
  font-family: inherit;
  resize: vertical;
  background: var(--card-bg);
  color: var(--text-primary);
}
.contact-form {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.contact-form[hidden] {
  display: none;
}
.contact-form button {
  background: var(--accent, #7f77dd);
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 10px;
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
}
.block-contact {
  background: var(--card-bg);
  box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}
.block-contact h3 {
  margin: 0 0 6px;
  font-size: 15px;
  font-weight: 600;
}
.block-contact > p {
  margin: 0 0 12px;
  font-size: 13px;
  color: var(--text-secondary);
}
.hp-field {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  opacity: 0;
}
.consent-label {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.4;
}
.consent-label input {
  appearance: none;
  -webkit-appearance: none;
  width: 18px;
  height: 18px;
  margin-top: 1px;
  flex-shrink: 0;
  border: 1.5px solid var(--border-color);
  border-radius: 5px;
  background: var(--card-bg);
  cursor: pointer;
  position: relative;
  transition: background 0.15s ease, border-color 0.15s ease;
}
.consent-label input:hover {
  border-color: var(--accent, #7f77dd);
}
.consent-label input:checked {
  background: var(--accent, #7f77dd);
  border-color: var(--accent, #7f77dd);
}
.consent-label input:checked::after {
  content: '';
  position: absolute;
  left: 5px;
  top: 2px;
  width: 5px;
  height: 9px;
  border: solid #fff;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}
.consent-label input:focus-visible {
  outline: 2px solid var(--accent, #7f77dd);
  outline-offset: 2px;
}
.newsletter-form button {
  background: var(--accent, #7f77dd);
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 10px;
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
}
.form-success {
  display: flex;
  align-items: center;
  gap: 6px;
  color: #1a7a4a;
  font-size: 13px;
  font-weight: 600;
  margin: 0;
}
.form-error {
  display: flex;
  align-items: center;
  gap: 6px;
  color: #b3261e;
  font-size: 12px;
  margin: 0 0 8px;
}
.form-success[hidden],
.form-error[hidden] {
  display: none;
}

.block-video {
  background: var(--card-bg);
  box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}
.video-title {
  margin: 0 0 8px;
  font-size: 13px;
  font-weight: 600;
}
.video-wrap {
  position: relative;
  padding-top: 56.25%;
  border-radius: 10px;
  overflow: hidden;
}
.video-wrap iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: none;
}

.block-download {
  background: var(--card-bg);
  display: flex;
  align-items: center;
  gap: 10px;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.block-download:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(0,0,0,0.08);
}
.download-icon {
  font-size: 26px;
  color: var(--accent, #7f77dd);
  flex-shrink: 0;
}
.download-info {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-width: 0;
}
.download-title {
  font-size: 13px;
  font-weight: 600;
}
.download-meta {
  font-size: 11px;
  color: var(--text-faint);
}
.download-arrow {
  color: var(--text-faint);
  font-size: 16px;
  flex-shrink: 0;
}

.block-qr {
  background: var(--card-bg);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  text-align: center;
  box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}
.qr-render {
  width: calc(100% + 28px);
  margin: -14px -14px 8px;
  border-radius: 14px 14px 0 0;
  overflow: hidden;
}
.qr-render img,
.qr-render canvas {
  width: 100%;
  height: auto;
  display: block;
}
.qr-title {
  margin: 0;
  font-size: 14px;
  font-weight: 700;
}
.qr-url-text {
  margin: 0;
  font-size: 12px;
  color: var(--text-muted);
  word-break: break-all;
}

body.no-scroll {
  overflow: hidden;
}

.site-footer {
  text-align: center;
  margin-top: 32px;
  padding-top: 20px;
  border-top: 1px solid var(--border-color);
}
.footer-links {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}
.footer-link {
  background: none;
  border: none;
  font-size: 12px;
  font-family: inherit;
  color: var(--text-muted);
  cursor: pointer;
  padding: 4px;
}
.footer-link:hover {
  color: var(--accent, #7f77dd);
}
.footer-dot {
  color: var(--text-faint);
  font-size: 12px;
}
.footer-credit {
  margin: 10px 0 0;
  font-size: 11px;
  color: var(--text-faint);
}
.footer-credit a {
  color: inherit;
  text-decoration: underline;
}

/* Impressum/Datenschutz-Sheet */
.sheet-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 100;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}
.sheet-backdrop[hidden] {
  display: none;
}
.sheet-panel {
  position: relative;
  background: var(--card-bg);
  width: 100%;
  max-width: 480px;
  max-height: 78vh;
  overflow-y: auto;
  border-radius: 20px 20px 0 0;
  padding: 14px 22px 32px;
  transform: translateY(100%);
  transition: transform 0.28s ease;
}
.sheet-panel.is-open {
  transform: translateY(0);
}
.sheet-handle {
  width: 36px;
  height: 4px;
  background: var(--border-color);
  border-radius: 2px;
  margin: 0 auto 18px;
}
.sheet-close {
  position: absolute;
  top: 12px;
  right: 16px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: none;
  background: var(--page-bg);
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 15px;
}
.sheet-body h2 {
  font-size: 18px;
  font-weight: 700;
  margin: 4px 0 16px;
}
.sheet-body p {
  font-size: 13px;
  line-height: 1.6;
  color: var(--text-primary);
  margin: 0 0 14px;
}
.sheet-hint {
  font-style: italic;
  color: var(--text-faint);
}
.sheet-fineprint {
  font-size: 11px;
  color: var(--text-faint);
}

/* Hell-/Dunkelmodus-Umschalter + Scroll-nach-oben */
.fab-btn {
  position: fixed;
  bottom: 16px;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 1px solid var(--border-color);
  background: var(--card-bg);
  color: var(--text-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(0,0,0,0.14);
  z-index: 40;
  font-size: 18px;
  transition: transform 0.15s ease, opacity 0.2s ease;
}
.fab-btn:hover {
  transform: scale(1.06);
}
.fab-btn:active {
  transform: scale(0.9);
}
.theme-fab {
  right: 16px;
}
.scroll-fab {
  right: 76px;
}
.scroll-fab[hidden] {
  display: none;
}
.theme-fab-icon {
  position: relative;
  width: 22px;
  height: 22px;
  display: block;
  font-size: 20px;
}
.theme-fab-sun,
.theme-fab-moon {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.35s cubic-bezier(.34, 1.56, .64, 1), opacity 0.25s ease;
}
.theme-fab-sun {
  opacity: 0;
  transform: rotate(-90deg) scale(0.4);
}
.theme-fab-moon {
  opacity: 1;
  transform: rotate(0deg) scale(1);
}
:root[data-theme="dark"] .theme-fab-sun {
  opacity: 1;
  transform: rotate(0deg) scale(1);
}
:root[data-theme="dark"] .theme-fab-moon {
  opacity: 0;
  transform: rotate(90deg) scale(0.4);
}
@keyframes fabPulse {
  from { box-shadow: 0 0 0 0 color-mix(in srgb, var(--accent, #7f77dd) 45%, transparent); }
  to { box-shadow: 0 0 0 16px color-mix(in srgb, var(--accent, #7f77dd) 0%, transparent); }
}
.theme-fab.is-pulsing {
  animation: fabPulse 0.5s ease-out;
}

.form-success-block {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 10px;
  padding: 10px 0 6px;
}
.form-success-block[hidden] {
  display: none;
}
.form-success-icon {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: color-mix(in srgb, var(--accent, #7f77dd) 15%, transparent);
  color: var(--accent, #7f77dd);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
}
.form-success-text {
  margin: 0;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
}
.btn-ghost-contact {
  background: transparent;
  border: 1.5px solid var(--accent, #7f77dd);
  color: var(--accent, #7f77dd);
  border-radius: 8px;
  padding: 8px 14px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
}
.btn-ghost-contact:hover {
  background: color-mix(in srgb, var(--accent, #7f77dd) 8%, transparent);
}
