:root {
  --accent: oklch(46% 0.09 165);
  --accent-hover: oklch(38% 0.09 165);
  --accent-soft: oklch(94% 0.03 165);
  --accent-2: oklch(56% 0.11 45);
  --accent-2-hover: oklch(48% 0.12 45);
  --accent-2-soft: oklch(94% 0.035 45);
  --accent-3: oklch(58% 0.15 80);
  --accent-3-soft: oklch(94% 0.04 80);
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 14px;
  --radius-xl: 22px;
  --shadow-sm: 0 1px 3px rgba(20, 40, 30, 0.07);
  --shadow-md: 0 6px 20px rgba(20, 40, 30, 0.10);
  --shadow-lg: 0 20px 48px rgba(20, 40, 30, 0.16);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, system-ui, 'Segoe UI', Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
  color: #14201b;
  background-color: white;
  line-height: 1.5;
}

nav {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-start;
  padding: 0.7rem 1.25rem;
  gap: 0.75rem;
  border-bottom: solid 1px #eaeaea;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

nav a {
  display: inline-flex;
  align-items: center;
  min-width: 0;
  padding: 0.4rem 0.9rem;
  border-radius: 999px;
  border: none;
  text-align: center;
  text-decoration: none;
  color: #555;
  font-weight: 600;
  font-size: 0.9rem;
  transition: background-color 0.15s, color 0.15s;
}

nav a[aria-current='page'] {
  color: var(--accent-hover);
  background-color: var(--accent-soft);
}

.nav-sub {
  color: #666;
  font-size: 0.85rem;
}

main {
  padding: 1rem;
  max-width: 900px;
  margin: 0 auto;
}

h1 {
  font-weight: bold;
  font-size: 1.5rem;
}

h2 {
  font-size: 1.15rem;
  margin: 0 0 0.25rem;
}

h3 {
  font-size: 1rem;
  margin: 0.5rem 0;
}

/* ---------- Auth ---------- */
.auth-main {
  min-height: 70vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.auth-card {
  width: 100%;
  max-width: 400px;
  border: solid 1px #e6e6e6;
  border-radius: var(--radius-lg);
  background: #fff;
  box-shadow: var(--shadow-md);
  padding: 1.5rem;
}

/* ---------- Legal pages (Impressum / Datenschutz) ---------- */
.legal-card {
  max-width: 680px;
  text-align: left;
}

.legal-card h1 {
  text-align: left;
  margin-bottom: 1rem;
}

.legal-card h2 {
  margin-top: 1.75rem;
}

.legal-card p,
.legal-card li {
  color: #333;
  font-size: 0.95rem;
}

.legal-card .back-link {
  display: inline-block;
  margin-bottom: 1.5rem;
}

.legal-card .todo {
  background: #fdf1d6;
  border: dashed 1px #c9a227;
  border-radius: 0.3rem;
  padding: 0.5rem 0.75rem;
  color: #7a5c00;
  font-size: 0.85rem;
}

.auth-card h1 {
  margin: 0 0 0.25rem;
  text-align: center;
}

.subtitle {
  text-align: center;
  color: #555;
  margin: 0 0 1rem;
  font-size: 0.9rem;
}

.tabs {
  display: flex;
  gap: 2px;
  margin-bottom: 1rem;
  border: none;
  background: #f0f0f0;
  border-radius: 999px;
  padding: 4px;
  overflow: hidden;
}

.tab {
  flex: 1;
  padding: 0.5rem;
  border: none;
  border-radius: 999px;
  background: transparent;
  color: #666;
  cursor: pointer;
  font-size: 0.9rem;
  font-weight: 600;
  transition: background-color 0.15s, color 0.15s, box-shadow 0.15s;
}

.tab.active {
  background: #fff;
  color: #14201b;
  box-shadow: var(--shadow-sm);
}

/* ---------- Underline tabs (manager/tenant detail views) ---------- */
.underline-tabs {
  display: flex;
  gap: 1.25rem;
  border: none;
  border-radius: 0;
  overflow: visible;
  border-bottom: solid 1px #ddd;
  margin-bottom: 1rem;
}
.underline-tabs .tab {
  flex: none;
  background: transparent;
  padding: 0.5rem 0.1rem;
  border-bottom: 2px solid transparent;
  border-radius: 0;
  color: #666;
  font-weight: 600;
}
.underline-tabs .tab.active {
  background: transparent;
  color: var(--accent);
  border-bottom-color: var(--accent);
}

.auth-contact {
  text-align: center;
  color: #888;
  font-size: 0.8rem;
  margin-top: 1rem;
}

.legal-links {
  text-align: center;
  font-size: 0.75rem;
  margin-top: 0.5rem;
}
.legal-links a {
  color: #888;
}

.footer-legal {
  text-align: center;
  padding: 1rem;
  font-size: 0.75rem;
  color: #999;
}
.footer-legal a {
  color: #999;
}

.auth-form {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.auth-form label {
  display: flex;
  flex-direction: column;
  font-size: 0.85rem;
  color: #333;
  gap: 0.25rem;
}

.hint {
  color: #888;
  font-size: 0.75rem;
}

input,
select {
  padding: 0.5rem;
  border: solid 1px #aaa;
  border-radius: 0.3rem;
  font-size: 0.95rem;
  font-family: inherit;
}

input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: var(--accent);
}

textarea {
  padding: 0.5rem;
  border: solid 1px #aaa;
  border-radius: 0.3rem;
  font-size: 0.95rem;
  font-family: inherit;
  resize: vertical;
}

.search-input {
  width: 100%;
  margin-bottom: 0.75rem;
}

/* ---------- Buttons ---------- */
.btn-primary,
.btn-secondary,
.btn-danger,
.btn-link {
  cursor: pointer;
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 600;
  border-radius: var(--radius-md);
  padding: 0.6rem 1.1rem;
  border: solid 1px #d8d8d8;
  transition: background-color 0.15s, color 0.15s, transform 0.15s, box-shadow 0.15s;
}

.btn-primary,
.btn-secondary {
  box-shadow: var(--shadow-sm);
}
.btn-primary:hover,
.btn-secondary:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

.btn-primary {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}
.btn-primary:hover {
  background: var(--accent-hover);
}

.btn-secondary.active {
  background: var(--accent-soft);
  border-color: var(--accent);
  color: var(--accent);
}

.btn-secondary {
  background: #eee;
  color: #333;
}
.btn-secondary:hover {
  background: #ddd;
}

.btn-danger {
  background: #fff;
  color: #c0392b;
  border-color: #c0392b;
}
.btn-danger:hover {
  background: #c0392b;
  color: #fff;
}

.btn-link {
  background: transparent;
  border: none;
  color: #555;
  text-decoration: underline;
  padding: 0.5rem;
}
.btn-link:hover {
  color: #000;
}

/* ---------- Nav extras ---------- */
.nav-user {
  margin-left: auto;
  font-size: 0.85rem;
  color: #555;
}

/* ---------- Forms ---------- */
.inline-form {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}
.inline-form input {
  flex: 1;
  min-width: 120px;
}

/* ---------- Cards ---------- */
.card-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-top: 1rem;
}

.card {
  border: solid 1px #e6e6e6;
  border-radius: var(--radius-lg);
  background: #fff;
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}

.card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.5rem;
  padding: 0.75rem 1rem;
  border-bottom: solid 1px #ddd;
  flex-wrap: wrap;
}

.card-actions {
  display: flex;
  gap: 0.4rem;
  flex-wrap: wrap;
}

.card-body {
  padding: 0;
}

.sub-panel {
  padding: 0.75rem 1rem;
}

/* ---------- Doc rows ---------- */
.doc-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem;
  padding: 0.6rem 0.5rem;
  border-radius: var(--radius-md);
  border-bottom: solid 1px #f0f0f0;
  flex-wrap: wrap;
  transition: background-color 0.15s;
}
.doc-row:hover {
  background: #fafafa;
}
.doc-row:last-child {
  border-bottom: none;
}

.doc-info {
  display: flex;
  flex-direction: column;
}

.doc-name {
  font-weight: 500;
  word-break: break-all;
}

.doc-meta {
  font-size: 0.75rem;
  color: #888;
}

.doc-rename-input {
  padding: 0.25rem 0.5rem;
  font-size: 0.95rem;
  font-weight: 500;
  min-width: 200px;
}

.doc-actions {
  display: flex;
  gap: 0.4rem;
  flex-wrap: wrap;
}

/* ---------- Misc ---------- */
.row {
  padding: 0.4rem 0;
  border-bottom: solid 1px #eee;
}
.row:last-child {
  border-bottom: none;
}

.muted {
  color: #888;
  font-size: 0.9rem;
}

.error {
  color: #c0392b;
  font-size: 0.85rem;
  min-height: 1.2em;
}

.hidden {
  display: none;
}

/* ---------- Portal window chrome (MacBook-style) ---------- */
body.portal-shell {
  margin: 0;
  min-height: 100vh;
  padding: 2.25rem 1.5rem;
  background:
    radial-gradient(48% 58% at 12% 12%, oklch(76% 0.11 165 / 95%) 0%, transparent 72%),
    radial-gradient(52% 62% at 88% 15%, oklch(80% 0.13 60 / 90%) 0%, transparent 72%),
    radial-gradient(55% 65% at 20% 92%, oklch(74% 0.11 250 / 80%) 0%, transparent 72%),
    radial-gradient(58% 68% at 92% 96%, oklch(82% 0.12 30 / 85%) 0%, transparent 72%),
    radial-gradient(70% 80% at 50% 50%, oklch(88% 0.05 85 / 60%) 0%, transparent 100%),
    linear-gradient(160deg, oklch(85% 0.04 200), oklch(90% 0.05 70));
  background-attachment: fixed;
}

.mac-window {
  max-width: 1280px;
  margin: 0 auto;
  background: #fff;
  border-radius: var(--radius-lg);
  border: solid 1px rgba(0, 0, 0, 0.08);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}

.mac-titlebar {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.65rem 1rem;
  background: linear-gradient(#f8f8f9, #eef0f1);
  border-bottom: solid 1px #e2e2e4;
}

.mac-dot {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  flex: none;
}
.mac-dot-red {
  background: #ff5f57;
}
.mac-dot-yellow {
  background: #febc2e;
}
.mac-dot-green {
  background: #28c840;
}

.mac-titlebar-label {
  flex: 1;
  text-align: center;
  margin-right: 2.5rem;
  font-size: 0.78rem;
  font-weight: 600;
  color: #777;
}

@media (max-width: 700px) {
  body.portal-shell {
    padding: 0;
  }
  .mac-window {
    border-radius: 0;
    border: none;
    box-shadow: none;
  }
}

/* ---------- Manager shell (sidebar + content) ---------- */
.shell {
  display: flex;
  align-items: flex-start;
  gap: 0;
  min-height: calc(100vh - 53px);
}

.sidebar {
  width: 260px;
  flex: none;
  border-right: solid 1px #ececee;
  padding: 1rem;
  background: #fafafc;
}

.sidebar-heading {
  font-size: 0.75rem;
  letter-spacing: 0.04em;
  color: #888;
  margin: 0.75rem 0 0.4rem;
}

.sidebar-list {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  margin-bottom: 0.5rem;
}

.sidebar-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0.7rem;
  border-radius: var(--radius-md);
  cursor: pointer;
  border: none;
  color: #333;
  transition: background-color 0.15s;
}
.sidebar-item:hover {
  background: rgba(0, 0, 0, 0.045);
}
.sidebar-item.active {
  background: var(--accent);
  color: #fff;
  font-weight: 600;
}
.sidebar-item.active .badge-dot {
  background: #fff;
  color: var(--accent);
}

.mieter-list-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 0.5rem;
}

.main {
  flex: 1;
  padding: 1.5rem 2rem;
  min-width: 0;
}

.objekt-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-bottom: 0.5rem;
}

.objekt-header-actions {
  display: flex;
  gap: 0.5rem;
}

.inline-form-vertical {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  margin: 0.5rem 0;
}

/* ---------- Mieter list + detail ---------- */
.mieter-layout {
  display: flex;
  gap: 1.5rem;
  flex-wrap: wrap;
  align-items: flex-start;
}

.mieter-list-col {
  width: 260px;
  flex: none;
}

.mieter-detail {
  flex: 1;
  min-width: 280px;
}

.detail-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-bottom: 1rem;
}

.detail-name {
  font-weight: 700;
  font-size: 1.1rem;
}

.detail-actions {
  display: flex;
  gap: 0.4rem;
  flex-wrap: wrap;
}

/* ---------- Badges ---------- */
.badge {
  display: inline-block;
  padding: 0.15rem 0.5rem;
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 600;
}
.badge-eingeladen {
  background: #fdf1d6;
  color: #8a6100;
}
.badge-aktiv,
.badge-bezahlt {
  background: var(--accent-soft);
  color: var(--accent);
}
.badge-offen {
  background: #fde3e0;
  color: #b3301f;
}

.badge-dot {
  display: inline-block;
  min-width: 1.2em;
  padding: 0 0.35em;
  border-radius: 999px;
  background: var(--accent-2);
  color: #fff;
  font-size: 0.7rem;
  font-weight: 700;
  text-align: center;
}

.badge-doc {
  background: oklch(60% 0.14 80);
}

/* ---------- Chat ---------- */
.chat-thread {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  max-height: 360px;
  overflow-y: auto;
  padding: 0.75rem;
  border: solid 1px #ddd;
  border-radius: var(--radius-md);
  background: #fafafa;
  margin-bottom: 0.5rem;
}

.chat-bubble {
  max-width: 75%;
  padding: 0.55rem 0.85rem;
  border-radius: var(--radius-lg);
  background: #fff;
  border: solid 1px #e0e0e0;
  box-shadow: var(--shadow-sm);
}
.chat-bubble.me {
  align-self: flex-end;
  background: var(--accent-soft);
  border-color: var(--accent);
}
.chat-bubble.them {
  align-self: flex-start;
}
.chat-time {
  font-size: 0.7rem;
  color: #999;
  margin-top: 0.15rem;
}

.chat-input-row {
  display: flex;
  gap: 0.5rem;
}
.chat-input-row input {
  flex: 1;
}

/* ---------- Documents / Payments / Posts ---------- */
.docs-section {
  margin-bottom: 1.5rem;
}

.payment-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
  padding: 0.6rem 0;
  border-bottom: solid 1px #eee;
  flex-wrap: wrap;
}
.payment-row:last-child {
  border-bottom: none;
}
.payment-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.post-card {
  border: solid 1px #eaeaea;
  border-radius: var(--radius-lg);
  padding: 0.85rem 1.1rem;
  margin-bottom: 0.75rem;
  background: #fff;
  box-shadow: var(--shadow-sm);
}
.post-title {
  font-weight: 700;
}

.zugang-panel {
  max-width: 480px;
}
.invite-text {
  width: 100%;
  margin: 0.5rem 0;
}

.objekt-switcher {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
  flex-wrap: wrap;
}

.empty-state {
  max-width: 480px;
}

.small {
  font-size: 0.75rem;
}

/* ---------- Toasts ---------- */
.toast-stack {
  position: fixed;
  bottom: 1rem;
  right: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  z-index: 1000;
}
.toast {
  background: #2c2c2c;
  color: #fff;
  padding: 0.6rem 1rem;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  max-width: 320px;
  opacity: 1;
  transition: opacity 0.3s;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.15);
}
.toast-out {
  opacity: 0;
}

/* ---------- Marketing site: nav ---------- */
.site-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  padding: 0.9rem 1.5rem;
  border-bottom: solid 1px #eaeaea;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.brand-h {
  color: var(--accent-2);
}

.site-nav .brand {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  min-width: 0;
  padding: 0;
  border: none;
  background: none;
  text-decoration: none;
  color: #111;
  font-weight: 700;
  letter-spacing: -0.01em;
  white-space: nowrap;
}

.brand-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  flex: none;
  border-radius: var(--radius-sm);
  background: var(--accent);
  color: #fff;
}
.brand-mark svg {
  width: 18px;
  height: 18px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.nav-links a {
  min-width: 0;
  padding: 0.25rem 0;
  border: none;
  background: none;
  color: #444;
  font-size: 0.92rem;
  text-decoration: none;
  transition: color 0.15s;
}
.nav-links a:hover {
  color: var(--accent);
}

.nav-cta {
  flex: none;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.55rem 1.1rem;
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
  font-size: 0.88rem;
  font-weight: 600;
  text-decoration: none;
  box-shadow: var(--shadow-sm);
  transition: background-color 0.15s, transform 0.15s, box-shadow 0.15s;
}
.nav-cta:hover {
  background: var(--accent-hover);
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

@media (max-width: 760px) {
  .site-nav {
    flex-wrap: wrap;
    row-gap: 0.6rem;
  }
  .nav-links {
    order: 3;
    width: 100%;
    justify-content: center;
    gap: 1rem 1.25rem;
  }
}

/* ---------- Marketing site: hero ---------- */
.hero {
  position: relative;
  overflow: hidden;
  padding: 4.5rem 1.5rem 5rem;
  background: #fff;
}

.hero::before {
  content: '';
  position: absolute;
  z-index: 0;
  inset: -10%;
  background:
    radial-gradient(55% 55% at 88% -5%, oklch(90% 0.06 80 / 65%) 0%, transparent 100%),
    radial-gradient(60% 55% at 75% 10%, oklch(92% 0.05 165 / 75%) 0%, transparent 100%),
    radial-gradient(50% 50% at 5% 20%, oklch(92% 0.05 45 / 55%) 0%, transparent 100%);
  animation: heroHue 16s ease-in-out infinite alternate;
}

@keyframes heroHue {
  0% { filter: hue-rotate(0deg); }
  100% { filter: hue-rotate(14deg); }
}

@media (prefers-reduced-motion: reduce) {
  .hero::before {
    animation: none;
  }
}

.hero-skyline {
  position: absolute;
  z-index: 0;
  left: 0;
  right: 0;
  bottom: 0;
  width: 100%;
  height: 130px;
  opacity: 0.16;
  mask-image: linear-gradient(to bottom, transparent, black 45%);
  -webkit-mask-image: linear-gradient(to bottom, transparent, black 45%);
  pointer-events: none;
}

.hero-inner {
  position: relative;
  z-index: 1;
  max-width: 1080px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  align-items: center;
  gap: 3rem;
}

.eyebrow {
  display: inline-block;
  padding: 0.3rem 0.85rem;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent-hover);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  margin-bottom: 1rem;
}

/* Wordmark: one continuous text node ("Hausverwaltung Blumenau") so it stays
   readable for screen readers and indexable. The Herz/Verstand labels are
   purely decorative and live in ::after, with empty alt text so assistive
   tech skips them. The plain `content` line is the fallback for browsers
   without the alt-text syntax. */
.wordmark {
  margin: 0;
  /* scales down on narrow screens: the labels are anchored to the first line,
     so the wordmark has to stay on a single line */
  font-size: clamp(1.05rem, 4.9vw, 1.7rem);
  white-space: nowrap;
  font-weight: 800;
  letter-spacing: -0.01em;
  line-height: 1.1;
  /* room for the decorative labels below the baseline */
  padding-bottom: 1.9rem;
  animation: wmRise 0.6s ease-out both;
}

.wm-h {
  position: relative;
  color: var(--accent-2-hover);
  /* the labels keep a fixed size while the wordmark scales, so this gap is
     sized for the narrowest case to keep HERZ clear of VERSTAND */
  padding-right: 1.8rem;
}
.wm-rest {
  position: relative;
  color: var(--accent-hover);
}
.wm-blumenau {
  color: #14201b;
}

.wm-h::after,
.wm-rest::after {
  position: absolute;
  top: 100%;
  left: 0;
  width: max-content;
  margin-top: 0.3rem;
  padding-top: 0.3rem;
  border-top: 2px solid currentColor;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  animation: wmLabelIn 0.5s ease-out both;
}
.wm-h::after {
  content: 'Herz';
  content: 'Herz' / '';
  animation-delay: 0.35s;
}
.wm-rest::after {
  content: 'Verstand';
  content: 'Verstand' / '';
  animation-delay: 0.5s;
}

@keyframes wmRise {
  from { opacity: 0; transform: translateY(0.4rem); }
  to { opacity: 1; transform: none; }
}

@keyframes wmLabelIn {
  from { opacity: 0; clip-path: inset(0 100% 0 0); }
  to { opacity: 1; clip-path: inset(0 0 0 0); }
}

@media (prefers-reduced-motion: reduce) {
  .wordmark,
  .wm-h::after,
  .wm-rest::after {
    animation: none;
  }
}

.wordmark-caption {
  color: #555;
  font-size: 0.9rem;
  margin: 0.6rem 0 1.25rem;
}

.hero h1 {
  font-size: 2.75rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.1;
  margin: 0 0 1rem;
}

.hero-subtitle {
  max-width: 480px;
  margin: 0 0 1.75rem;
  color: #445;
  font-size: 1.05rem;
}

.hero-actions {
  display: flex;
  gap: 0.85rem;
  flex-wrap: wrap;
  margin-bottom: 1.75rem;
}

.hero-actions .btn-primary,
.hero-actions .btn-secondary {
  padding: 0.75rem 1.4rem;
  border-radius: 999px;
  font-size: 0.95rem;
}

.trust-row {
  display: flex;
  gap: 0.6rem 1.25rem;
  flex-wrap: wrap;
  list-style: none;
  margin: 0;
  padding: 0;
}
.trust-row li {
  font-size: 0.85rem;
  color: #333;
}
.trust-row li::before {
  content: '✓';
  color: var(--accent);
  font-weight: 700;
  margin-right: 0.35rem;
}

/* ---------- Hero portal-preview mockup ---------- */
.hero-visual {
  position: relative;
  display: flex;
  justify-content: center;
}

.mock-card {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 340px;
  background: #fff;
  border: solid 1px #e6e6e6;
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg);
  padding: 1.1rem;
  transform: rotate(1.5deg);
}

.float-chip {
  position: absolute;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 3.25rem;
  height: 3.25rem;
  border-radius: var(--radius-lg);
  background: #fff;
  box-shadow: var(--shadow-md);
  animation: float 4.5s ease-in-out infinite;
}
.float-chip svg {
  width: 22px;
  height: 22px;
}
.float-chip.chip-1 {
  top: -1.1rem;
  left: -0.5rem;
  color: var(--accent-2);
  animation-delay: 0s;
}
.float-chip.chip-2 {
  bottom: -0.9rem;
  right: 0.5rem;
  color: var(--accent-3);
  animation-delay: 1.4s;
}
.float-chip.chip-3 {
  top: 40%;
  right: -1.3rem;
  color: var(--accent);
  animation-delay: 2.6s;
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

@media (prefers-reduced-motion: reduce) {
  .float-chip {
    animation: none;
  }
}

.mock-card-head {
  display: flex;
  gap: 0.35rem;
  margin-bottom: 0.9rem;
}
.mock-dot {
  width: 0.55rem;
  height: 0.55rem;
  border-radius: 50%;
  background: #e2e2e2;
}
.mock-dot:first-child {
  background: var(--accent-2);
}

.mock-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
  padding: 0.6rem 0;
  border-bottom: solid 1px #f0f0f0;
  font-size: 0.85rem;
  color: #333;
}
.mock-row:last-child {
  border-bottom: none;
}

/* ---------- Marketing site: sections ---------- */
.site-main {
  max-width: 1000px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.section {
  padding: 4rem 0;
  border-bottom: solid 1px #f0f0f0;
}
.section:last-of-type {
  border-bottom: none;
}

.section-alt {
  background: #fafbfa;
  border-radius: var(--radius-xl);
  padding: 3rem 2rem;
  border-bottom: none;
}

.section-title {
  font-size: 1.7rem;
  font-weight: 800;
  letter-spacing: -0.01em;
  margin: 0 0 0.5rem;
}

.section-intro {
  color: #555;
  margin: 0 0 2rem;
  max-width: 620px;
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 1.25rem;
}

.feature-card {
  border: solid 1px #eaeaea;
  border-radius: var(--radius-lg);
  padding: 1.4rem 1.4rem 1.5rem;
  background: #fff;
  box-shadow: var(--shadow-sm);
  transition: transform 0.18s, box-shadow 0.18s;
}
.feature-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}

.feature-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.75rem;
  height: 2.75rem;
  border-radius: var(--radius-md);
  background: var(--accent-soft);
  color: var(--accent-hover);
  margin-bottom: 0.85rem;
}
.feature-icon svg {
  width: 22px;
  height: 22px;
}
.feature-icon.c-gold {
  background: var(--accent-3-soft);
  color: var(--accent-3);
}
.feature-icon.c-terracotta {
  background: var(--accent-2-soft);
  color: var(--accent-2-hover);
}

.feature-card h3 {
  margin: 0 0 0.4rem;
  font-size: 1.05rem;
}

.feature-card p {
  margin: 0;
  color: #555;
  font-size: 0.9rem;
}

/* ---------- Digital-Vergleich (Klassisch vs. Portal) ---------- */
.section-digital {
  background: linear-gradient(135deg, oklch(24% 0.03 165), oklch(20% 0.03 250));
  border-radius: var(--radius-xl);
  padding: 3rem 2rem;
  text-align: center;
  color: #fff;
}
.section-digital .section-title {
  color: #fff;
}
.section-digital .section-intro {
  color: rgba(255, 255, 255, 0.7);
  margin-left: auto;
  margin-right: auto;
}

.compare {
  max-width: 720px;
  margin: 2rem auto 0;
}

.compare-toggle-input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.compare-seg {
  display: inline-flex;
  gap: 2px;
  background: rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  padding: 4px;
  margin-bottom: 2rem;
}

.seg-btn {
  padding: 0.55rem 1.4rem;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.88rem;
  color: rgba(255, 255, 255, 0.65);
  cursor: pointer;
  transition: background-color 0.2s, color 0.2s;
}

#compare-before:checked ~ .compare-seg label[for='compare-before'],
#compare-after:checked ~ .compare-seg label[for='compare-after'] {
  background: #fff;
  color: #14201b;
}

.compare-panels {
  text-align: left;
}

.compare-panel {
  display: none;
  align-items: center;
  gap: 2rem;
}
#compare-before:checked ~ .compare-panels .panel-before,
#compare-after:checked ~ .compare-panels .panel-after {
  display: flex;
}

.stack-illustration {
  flex: none;
  width: 130px;
  height: auto;
}

.mock-card-sm {
  flex: none;
  width: 220px;
  transform: none;
}

.compare-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}
.compare-list li {
  position: relative;
  padding-left: 1.6rem;
  font-size: 0.95rem;
}
.list-before li {
  color: rgba(255, 255, 255, 0.6);
}
.list-before li::before {
  content: '✕';
  position: absolute;
  left: 0;
  color: rgba(255, 255, 255, 0.35);
  font-weight: 700;
}
.list-after li {
  color: #fff;
}
.list-after li::before {
  content: '✓';
  position: absolute;
  left: 0;
  color: var(--accent-3);
  font-weight: 700;
}

@media (max-width: 600px) {
  .section-digital {
    padding: 2rem 1.25rem;
  }
  .compare-panel {
    flex-direction: column;
    text-align: center;
  }
}

/* ---------- Über mich ---------- */
.about-card {
  display: flex;
  align-items: center;
  gap: 1.75rem;
  background: #fff;
  border: solid 1px #eaeaea;
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-sm);
  padding: 2rem;
}

.avatar-circle {
  flex: none;
  width: 4.5rem;
  height: 4.5rem;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 1.3rem;
}

.about-photo {
  flex: none;
  width: 8rem;
  height: 8rem;
  border-radius: 50%;
  padding: 0.3rem;
  background: linear-gradient(135deg, var(--accent), var(--accent-3), var(--accent-2));
}
.about-photo img {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  border: solid 3px #fff;
}

.about-card p {
  margin: 0;
  color: #333;
}

.referenzen-top {
  display: flex;
  align-items: center;
  gap: 2rem;
  flex-wrap: wrap;
  margin-bottom: 1rem;
}

.building-illustration {
  flex: none;
  width: 120px;
  height: auto;
}

.referenzen-copy {
  flex: 1;
  min-width: 260px;
}

.stat-row {
  display: flex;
  gap: 2.5rem;
  flex-wrap: wrap;
  margin: 1.5rem 0 0;
}

.stat-tile {
  display: flex;
  flex-direction: column;
}

.stat-number {
  font-size: 2.5rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1;
}
.stat-tile:nth-child(1) .stat-number {
  color: var(--accent);
}
.stat-tile:nth-child(2) .stat-number {
  color: var(--accent-2);
}

.stat-label {
  color: #555;
  font-size: 0.85rem;
  margin-top: 0.35rem;
}

/* ---------- Ablauf / Steps ---------- */
.steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.5rem;
  margin-bottom: 1.5rem;
}

.step-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.1rem;
  height: 2.1rem;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  font-weight: 700;
  font-size: 0.9rem;
  margin-bottom: 0.6rem;
}
.step:nth-child(2) .step-num {
  background: var(--accent-3);
}
.step:nth-child(3) .step-num {
  background: var(--accent-2);
}

.step h3 {
  margin: 0 0 0.3rem;
  font-size: 1rem;
}

.step p {
  margin: 0;
  color: #555;
  font-size: 0.88rem;
}

/* ---------- FAQ ---------- */
.faq-list {
  max-width: 720px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.faq-item {
  border: solid 1px #eaeaea;
  border-radius: var(--radius-lg);
  background: #fff;
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}

.faq-item summary {
  cursor: pointer;
  list-style: none;
  padding: 1.1rem 1.4rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  hyphens: auto;
  overflow-wrap: anywhere;
}
.faq-item summary::-webkit-details-marker {
  display: none;
}
.faq-item summary::after {
  content: '+';
  flex: none;
  font-size: 1.3rem;
  font-weight: 400;
  color: var(--accent);
  transition: transform 0.18s;
}
.faq-item[open] summary::after {
  transform: rotate(45deg);
}

.faq-item p {
  margin: 0;
  padding: 0 1.4rem 1.25rem;
  color: #555;
  font-size: 0.92rem;
}

/* ---------- Preise ---------- */
.pricing-card {
  max-width: 640px;
  margin: 0 auto;
  text-align: center;
  background: linear-gradient(160deg, var(--accent-soft), #fff 70%);
  border: solid 1px #e2ede6;
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-md);
  padding: 2.75rem 2rem;
}
.pricing-card p {
  color: #333;
  max-width: 460px;
  margin: 0 auto 1.5rem;
}

.pricing-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 3rem;
  height: 3rem;
  border-radius: 50%;
  background: #fff;
  color: var(--accent);
  box-shadow: var(--shadow-sm);
  margin-bottom: 1rem;
}
.pricing-icon svg {
  width: 24px;
  height: 24px;
}

/* ---------- Kontakt ---------- */
.contact-card {
  max-width: 480px;
  margin: 0 auto;
  text-align: center;
  background: #fff;
  border: solid 1px #eaeaea;
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-sm);
  padding: 2.25rem 2rem;
}
.contact-card p {
  margin: 0 0 1.25rem;
}
.contact-card .btn-secondary {
  border-radius: 999px;
  padding: 0.7rem 1.4rem;
}

/* ---------- Für Handwerker:innen ---------- */
.handwerker-card {
  display: flex;
  align-items: center;
  gap: 1.75rem;
  background: linear-gradient(135deg, var(--accent-3-soft), var(--accent-2-soft));
  border: solid 1px oklch(88% 0.04 70);
  border-radius: var(--radius-xl);
  padding: 2rem;
}

.handwerker-icon {
  flex: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 3.5rem;
  height: 3.5rem;
  border-radius: 50%;
  background: #fff;
  color: var(--accent-2-hover);
  box-shadow: var(--shadow-sm);
}
.handwerker-icon svg {
  width: 26px;
  height: 26px;
}

.handwerker-copy {
  flex: 1;
  min-width: 220px;
}
.handwerker-copy h2 {
  margin: 0 0 0.35rem;
  font-size: 1.3rem;
  font-weight: 800;
}
.handwerker-copy p {
  margin: 0;
  color: #444;
}

.handwerker-card .btn-primary {
  flex: none;
  background: var(--accent-2);
  border-color: var(--accent-2);
  border-radius: 999px;
}
.handwerker-card .btn-primary:hover {
  background: var(--accent-2-hover);
}

/* ---------- Footer ---------- */
.site-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
  max-width: 1000px;
  margin: 0 auto;
  padding: 2rem 1.5rem;
  border-top: solid 1px #eee;
  text-align: left;
}

.footer-links {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

@media (max-width: 760px) {
  .hero-inner {
    grid-template-columns: 1fr;
  }
  .hero-visual {
    display: none;
  }
  .hero {
    padding: 3rem 1.25rem 3.5rem;
  }
  .about-card {
    flex-direction: column;
    text-align: center;
  }
  .section-alt {
    padding: 2rem 1.25rem;
  }
  .site-footer {
    justify-content: center;
    text-align: center;
  }
  .handwerker-card {
    flex-direction: column;
    text-align: center;
    padding: 1.75rem;
  }
  .referenzen-top {
    flex-direction: column;
    text-align: center;
  }
}

/* ---------- Responsive ---------- */
@media (max-width: 600px) {
  .card-header {
    flex-direction: column;
  }
  .card-actions {
    width: 100%;
  }
  .doc-row {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (max-width: 860px) {
  .shell {
    flex-direction: column;
  }
  .sidebar {
    width: 100%;
    border-right: none;
    border-bottom: solid 1px #ddd;
  }
  .mieter-list-col {
    width: 100%;
  }
}

/* ---------- Scroll reveal ---------- */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.feature-grid .feature-card:nth-child(1) { transition-delay: 0s; }
.feature-grid .feature-card:nth-child(2) { transition-delay: 0.07s; }
.feature-grid .feature-card:nth-child(3) { transition-delay: 0.14s; }
.feature-grid .feature-card:nth-child(4) { transition-delay: 0.21s; }
.feature-grid .feature-card:nth-child(5) { transition-delay: 0.28s; }
.feature-grid .feature-card:nth-child(6) { transition-delay: 0.35s; }
.feature-grid .feature-card:nth-child(7) { transition-delay: 0.42s; }

.steps .step:nth-child(1) { transition-delay: 0s; }
.steps .step:nth-child(2) { transition-delay: 0.1s; }
.steps .step:nth-child(3) { transition-delay: 0.2s; }

@media (prefers-reduced-motion: reduce) {
  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

/* ---------- Cursor spotlight (cards) ---------- */
.spotlight {
  position: relative;
  isolation: isolate;
}
.spotlight::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 0;
  border-radius: inherit;
  background: radial-gradient(220px circle at var(--mx, 50%) var(--my, 50%), oklch(100% 0 0 / 60%), transparent 70%);
  opacity: 0;
  transition: opacity 0.25s;
  pointer-events: none;
}
.spotlight:hover::before {
  opacity: 1;
}
.spotlight > * {
  position: relative;
  z-index: 1;
}

@media (hover: none) {
  .spotlight::before {
    display: none;
  }
}
