/* =========================================================================
   IPEM Immobilien GmbH - Datenraum & Vermarktung Harkortstrasse 34-36
   Corporate Design: Primaerblau #005481, Grau #909692, neutrale Toene.
   Keine externen Ressourcen. Systemschriftarten (kein Google Fonts).
   ========================================================================= */

:root {
  --ipem-blue: #005481;
  --ipem-blue-dark: #013f61;
  --ipem-blue-light: #e8f1f6;
  --ipem-grey: #909692;
  --ipem-grey-light: #f4f5f6;
  --ipem-grey-border: #e2e5e6;
  --ink: #23292c;
  --ink-soft: #566065;
  --white: #ffffff;
  --danger: #b4392b;
  --success: #2f7d4f;
  --radius: 10px;
  --radius-sm: 6px;
  --shadow: 0 2px 8px rgba(0, 40, 65, .06);
  --shadow-lg: 0 12px 40px rgba(0, 40, 65, .12);
  --maxw: 1120px;
  --font: "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", system-ui, -apple-system, sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  background: var(--white);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

a { color: var(--ipem-blue); }

h1, h2, h3 { line-height: 1.2; color: var(--ink); font-weight: 700; letter-spacing: -.01em; }

.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }

.muted { color: var(--ink-soft); }
.lead { font-size: 1.08rem; color: var(--ink-soft); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-block;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  padding: 13px 24px;
  font-size: 1rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  text-decoration: none;
  text-align: center;
  transition: background .15s, color .15s, border-color .15s;
}
.btn--primary { background: var(--ipem-blue); color: var(--white); }
.btn--primary:hover { background: var(--ipem-blue-dark); }
.btn--ghost { background: transparent; color: var(--ipem-blue); border-color: var(--ipem-blue); }
.btn--ghost:hover { background: var(--ipem-blue-light); }
.btn--danger { background: var(--danger); color: var(--white); }
.btn--danger:hover { filter: brightness(.92); }
.btn--small { padding: 8px 16px; font-size: .9rem; }

/* =========================================================================
   Oeffentliche Website
   ========================================================================= */

/* ---------- Kopf / Navigation ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255, 255, 255, .96);
  backdrop-filter: saturate(180%) blur(6px);
  border-bottom: 1px solid var(--ipem-grey-border);
}
.site-header__inner { display: flex; align-items: center; justify-content: space-between; height: 68px; }
.brand { display: flex; flex-direction: column; text-decoration: none; }
.brand__logo {
  font-size: 1.5rem; font-weight: 800; letter-spacing: 1px; color: var(--ipem-blue); line-height: 1;
}
.brand__tag { font-size: .72rem; color: var(--ipem-grey); letter-spacing: .04em; text-transform: uppercase; }
.site-nav { display: flex; align-items: center; gap: 26px; }
.site-nav a { color: var(--ink); text-decoration: none; font-weight: 500; font-size: .96rem; }
.site-nav a:hover { color: var(--ipem-blue); }
.site-nav .btn { color: var(--white); }
.nav-toggle { display: none; background: none; border: 0; cursor: pointer; padding: 8px; }
.nav-toggle span { display: block; width: 24px; height: 2px; background: var(--ink); margin: 5px 0; transition: .2s; }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  background: linear-gradient(135deg, var(--ipem-blue) 0%, var(--ipem-blue-dark) 100%);
  color: var(--white);
  overflow: hidden;
}
.hero__grid { display: grid; grid-template-columns: 1.1fr .9fr; gap: 40px; align-items: center; padding: 84px 0; }
.hero__eyebrow {
  display: inline-block; background: rgba(255, 255, 255, .14); color: #cfe4ef;
  padding: 6px 14px; border-radius: 30px; font-size: .8rem; font-weight: 600;
  letter-spacing: .05em; text-transform: uppercase; margin-bottom: 18px;
}
.hero h1 { color: var(--white); font-size: clamp(2rem, 4vw, 3rem); margin: 0 0 18px; }
.hero p { color: #d6e6ef; font-size: 1.15rem; max-width: 42ch; margin: 0 0 30px; }
.hero__cta { display: flex; gap: 14px; flex-wrap: wrap; }
.hero__cta .btn--primary { background: var(--white); color: var(--ipem-blue); }
.hero__cta .btn--primary:hover { background: #eaf3f8; }
.hero__cta .btn--ghost { color: var(--white); border-color: rgba(255, 255, 255, .6); }
.hero__cta .btn--ghost:hover { background: rgba(255, 255, 255, .12); }
.hero__card {
  background: rgba(255, 255, 255, .10); border: 1px solid rgba(255, 255, 255, .22);
  border-radius: var(--radius); padding: 26px;
}
.hero__card h3 { color: var(--white); font-size: 1.05rem; margin: 0 0 16px; }
.hero__facts { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.hero__facts li { display: flex; justify-content: space-between; gap: 12px; border-bottom: 1px dashed rgba(255, 255, 255, .2); padding-bottom: 10px; color: #eaf3f8; }
.hero__facts li:last-child { border-bottom: 0; }
.hero__facts .k { color: #a9cadd; }
.hero__facts .v { font-weight: 700; color: var(--white); text-align: right; }

/* ---------- Sektionen allgemein ---------- */
.section { padding: 80px 0; }
.section--alt { background: var(--ipem-grey-light); }
.section__head { max-width: 720px; margin: 0 0 44px; }
.section__eyebrow { color: var(--ipem-blue); font-weight: 700; text-transform: uppercase; letter-spacing: .08em; font-size: .8rem; }
.section h2 { font-size: clamp(1.6rem, 3vw, 2.2rem); margin: 8px 0 14px; }
.section__head p { color: var(--ink-soft); font-size: 1.05rem; margin: 0; }

/* Platzhalter-Markierung (wird von echten Inhalten ersetzt) */
.placeholder { outline: 1px dashed var(--ipem-grey); outline-offset: 3px; }
.placeholder-note {
  display: inline-block; background: #fff6e5; color: #8a6100; border: 1px solid #f0d9a8;
  font-size: .78rem; padding: 3px 9px; border-radius: 20px; margin-bottom: 10px; font-weight: 600;
}

/* ---------- Objektueberblick / Feature-Cards ---------- */
.feature-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.feature {
  background: var(--white); border: 1px solid var(--ipem-grey-border); border-radius: var(--radius);
  padding: 26px; box-shadow: var(--shadow);
}
.feature__icon {
  width: 46px; height: 46px; border-radius: 10px; background: var(--ipem-blue-light); color: var(--ipem-blue);
  display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 1.1rem; margin-bottom: 16px;
}
.feature h3 { font-size: 1.12rem; margin: 0 0 8px; }
.feature p { color: var(--ink-soft); margin: 0; font-size: .97rem; }

/* ---------- Einheiten (Halle 1 / 2 / Gesamtpaket) ---------- */
.units { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.unit {
  border: 1px solid var(--ipem-grey-border); border-radius: var(--radius); overflow: hidden;
  background: var(--white); box-shadow: var(--shadow); display: flex; flex-direction: column;
}
.unit__head { background: var(--ipem-blue); color: var(--white); padding: 18px 22px; }
.unit__head h3 { color: var(--white); margin: 0; font-size: 1.2rem; }
.unit__head .tag { font-size: .8rem; color: #bcd8e6; }
.unit--highlight .unit__head { background: linear-gradient(135deg, var(--ipem-blue), var(--ipem-blue-dark)); }
.unit__body { padding: 20px 22px; flex: 1; }
.unit__specs { list-style: none; margin: 0 0 18px; padding: 0; }
.unit__specs li { display: flex; justify-content: space-between; padding: 9px 0; border-bottom: 1px solid var(--ipem-grey-border); font-size: .95rem; }
.unit__specs li:last-child { border-bottom: 0; }
.unit__specs .k { color: var(--ink-soft); }
.unit__specs .v { font-weight: 700; }
.unit__foot { padding: 0 22px 22px; }

/* ---------- Flaechen / Raster-Tabelle ---------- */
.table-scroll { overflow-x: auto; border: 1px solid var(--ipem-grey-border); border-radius: var(--radius); }
table.data { width: 100%; border-collapse: collapse; min-width: 560px; background: var(--white); }
table.data th, table.data td { text-align: left; padding: 14px 18px; border-bottom: 1px solid var(--ipem-grey-border); font-size: .95rem; }
table.data thead th { background: var(--ipem-blue); color: var(--white); font-weight: 600; white-space: nowrap; }
table.data tbody tr:nth-child(even) { background: #fafbfb; }
table.data tfoot td { font-weight: 700; background: var(--ipem-blue-light); }

/* ---------- Ausstattung ---------- */
.equip { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px 34px; list-style: none; padding: 0; margin: 0; }
.equip li { display: flex; gap: 12px; align-items: flex-start; padding: 8px 0; border-bottom: 1px solid var(--ipem-grey-border); }
.equip li::before { content: "\2713"; color: var(--ipem-blue); font-weight: 800; }

/* ---------- Lage / Karte ---------- */
.location { display: grid; grid-template-columns: 1fr 1fr; gap: 34px; align-items: stretch; }
.map-box {
  border: 1px solid var(--ipem-grey-border); border-radius: var(--radius); overflow: hidden;
  background: repeating-linear-gradient(45deg, #eef1f2, #eef1f2 12px, #e7ebec 12px, #e7ebec 24px);
  min-height: 320px; display: flex; align-items: center; justify-content: center; text-align: center; padding: 24px;
}
.map-box__inner { background: rgba(255, 255, 255, .92); border-radius: var(--radius-sm); padding: 22px 26px; box-shadow: var(--shadow); }
.map-box__inner strong { display: block; font-size: 1.05rem; color: var(--ipem-blue); }
.location__list { list-style: none; padding: 0; margin: 0; }
.location__list li { padding: 12px 0; border-bottom: 1px solid var(--ipem-grey-border); display: flex; gap: 12px; }
.location__list li::before { content: "\25B8"; color: var(--ipem-blue); }

/* ---------- Galerie ---------- */
.gallery { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.gallery figure { margin: 0; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--ipem-grey-border); background: var(--white); }
.gallery .ph-img {
  aspect-ratio: 4 / 3; background: linear-gradient(135deg, #dfe6ea, #eef2f4);
  display: flex; align-items: center; justify-content: center; color: var(--ipem-grey); font-weight: 600; font-size: .9rem;
}
.gallery figcaption { padding: 10px 14px; font-size: .88rem; color: var(--ink-soft); }

/* ---------- Kontakt / CTA ---------- */
.cta-band { background: linear-gradient(135deg, var(--ipem-blue), var(--ipem-blue-dark)); color: var(--white); border-radius: var(--radius); padding: 46px; text-align: center; }
.cta-band h2 { color: var(--white); }
.cta-band p { color: #d6e6ef; max-width: 52ch; margin: 10px auto 26px; }
.cta-band .btn--primary { background: var(--white); color: var(--ipem-blue); }
.cta-band .btn--primary:hover { background: #eaf3f8; }

.contact { display: grid; grid-template-columns: 1fr 1fr; gap: 34px; align-items: start; }
.contact-card { border: 1px solid var(--ipem-grey-border); border-radius: var(--radius); padding: 26px; box-shadow: var(--shadow); background: var(--white); }
.contact-card h3 { margin: 0 0 6px; }
.contact-card dl { display: grid; grid-template-columns: auto 1fr; gap: 8px 16px; margin: 16px 0 0; }
.contact-card dt { color: var(--ink-soft); }
.contact-card dd { margin: 0; font-weight: 600; }

/* ---------- Footer ---------- */
.site-footer { background: #10262f; color: #c4d2d9; padding: 46px 0 26px; }
.site-footer a { color: #cfe4ef; text-decoration: none; }
.site-footer a:hover { text-decoration: underline; }
.site-footer__grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 30px; }
.site-footer h4 { color: var(--white); font-size: .95rem; margin: 0 0 14px; }
.site-footer ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; font-size: .92rem; }
.site-footer__bottom { border-top: 1px solid rgba(255, 255, 255, .12); margin-top: 30px; padding-top: 18px; font-size: .82rem; color: #8ba0a9; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px; }

/* ---------- Rechtstext-Seiten (Impressum/Datenschutz) ---------- */
.legal { padding: 60px 0; }
.legal .container { max-width: 820px; }
.legal h1 { font-size: 2rem; margin-bottom: 8px; }
.legal h2 { font-size: 1.25rem; margin: 34px 0 10px; color: var(--ipem-blue); }
.legal h3 { font-size: 1.05rem; margin: 22px 0 6px; }
.legal p, .legal li { color: #33393c; }
.legal .back { display: inline-block; margin-bottom: 22px; color: var(--ipem-blue); text-decoration: none; }

/* =========================================================================
   App-Seiten (Registrierung, Datenraum, Admin) - dieselben Design-Tokens
   ========================================================================= */
.app-body { background: var(--ipem-grey-light); min-height: 100vh; display: flex; flex-direction: column; }
.app-header { background: var(--ipem-blue); color: var(--white); display: flex; align-items: center; justify-content: space-between; padding: 16px 24px; }
.app-brand { text-decoration: none; display: flex; flex-direction: column; }
.app-brand__logo { color: var(--white); font-weight: 800; letter-spacing: 1px; font-size: 1.25rem; }
.app-brand__sub { color: #bcd8e6; font-size: .78rem; }
.app-header__nav a { color: #eaf3f8; text-decoration: none; font-size: .92rem; }
.app-header__nav a:hover { text-decoration: underline; }
.app-main { flex: 1; width: 100%; max-width: 640px; margin: 0 auto; padding: 44px 20px; }
.app-main--wide { max-width: 1080px; }
.app-footer { background: #10262f; color: #9fb2ba; padding: 16px 24px; display: flex; justify-content: space-between; font-size: .82rem; flex-wrap: wrap; gap: 8px; }
.app-footer a { color: #cfe4ef; text-decoration: none; margin-left: 16px; }

.card { background: var(--white); border: 1px solid var(--ipem-grey-border); border-radius: var(--radius); padding: 32px; box-shadow: var(--shadow); }
.card h1 { font-size: 1.55rem; margin: 0 0 12px; }
.card--message { text-align: center; }
.card--message .btn { margin-top: 10px; }
.check-badge { width: 58px; height: 58px; border-radius: 50%; background: var(--success); color: #fff; font-size: 1.8rem; display: flex; align-items: center; justify-content: center; margin: 0 auto 18px; }

/* Formulare */
.field { margin-bottom: 18px; }
.field label { display: block; font-weight: 600; margin-bottom: 6px; font-size: .95rem; }
.field input[type=text], .field input[type=email] {
  width: 100%; padding: 12px 14px; border: 1px solid var(--ipem-grey-border); border-radius: var(--radius-sm);
  font-size: 1rem; font-family: inherit; background: #fff; color: var(--ink);
}
.field input:focus { outline: 2px solid var(--ipem-blue); border-color: var(--ipem-blue); }
.field--check { display: grid; grid-template-columns: auto 1fr; gap: 12px; align-items: start; }
.field--check label { font-weight: 400; font-size: .88rem; color: var(--ink-soft); line-height: 1.5; }
.field--check input { margin-top: 4px; width: 18px; height: 18px; }
.form-hint { font-size: .82rem; color: var(--ink-soft); margin: 12px 0 0; }
.form-alt { margin-top: 20px; font-size: .92rem; }
.card--form .btn--primary { width: 100%; }

/* Alerts */
.alert { border-radius: var(--radius-sm); padding: 14px 18px; margin: 0 0 20px; }
.alert ul { margin: 0; padding-left: 18px; }
.alert--error { background: #fdecea; border: 1px solid #f5c4bd; color: #8f2c20; }
.alert--info { background: var(--ipem-blue-light); border: 1px solid #bcdcec; color: #0a4a6b; }
.alert--success { background: #e9f6ef; border: 1px solid #b6ddc6; color: #1f6640; }

/* Datenraum-Dokumentliste */
.dataroom__head { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-bottom: 8px; flex-wrap: wrap; }
.doc-group { margin-top: 28px; }
.doc-group h2 { font-size: 1.1rem; color: var(--ipem-blue); border-bottom: 2px solid var(--ipem-blue-light); padding-bottom: 8px; }
.doc-list { list-style: none; padding: 0; margin: 14px 0 0; }
.doc-item { display: flex; align-items: center; gap: 16px; background: var(--white); border: 1px solid var(--ipem-grey-border); border-radius: var(--radius-sm); padding: 14px 16px; margin-bottom: 10px; }
.doc-item__icon { width: 44px; height: 44px; border-radius: 8px; background: var(--ipem-blue-light); color: var(--ipem-blue); display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: .72rem; flex-shrink: 0; }
.doc-item__meta { flex: 1; display: flex; flex-direction: column; }
.doc-item__title { font-weight: 600; }
.doc-item__sub { color: var(--ink-soft); font-size: .82rem; }

/* Admin */
.stat-row { display: flex; gap: 16px; margin: 20px 0; flex-wrap: wrap; }
.stat { background: var(--white); border: 1px solid var(--ipem-grey-border); border-radius: var(--radius-sm); padding: 16px 22px; min-width: 120px; }
.stat__num { display: block; font-size: 1.8rem; font-weight: 800; color: var(--ipem-blue); }
.stat__label { color: var(--ink-soft); font-size: .85rem; }
.table-wrap { overflow-x: auto; border: 1px solid var(--ipem-grey-border); border-radius: var(--radius); margin-top: 12px; }
.admin-table { width: 100%; border-collapse: collapse; min-width: 820px; background: var(--white); }
.admin-table th, .admin-table td { padding: 12px 14px; border-bottom: 1px solid var(--ipem-grey-border); text-align: left; font-size: .9rem; }
.admin-table thead th { background: var(--ipem-blue); color: var(--white); position: sticky; top: 0; }
.badge { display: inline-block; padding: 3px 10px; border-radius: 20px; font-size: .78rem; font-weight: 600; }
.badge--verified { background: #e9f6ef; color: #1f6640; }
.badge--pending { background: #fff3df; color: #8a6100; }
.admin__exports { display: flex; gap: 10px; }

/* =========================================================================
   Responsive
   ========================================================================= */
@media (max-width: 900px) {
  .hero__grid { grid-template-columns: 1fr; padding: 60px 0; }
  .feature-grid, .units, .gallery { grid-template-columns: 1fr 1fr; }
  .location, .contact { grid-template-columns: 1fr; }
  .site-footer__grid { grid-template-columns: 1fr 1fr; }
  .equip { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .site-nav { position: fixed; inset: 68px 0 auto 0; background: var(--white); flex-direction: column; align-items: stretch; gap: 0; padding: 8px 24px 20px; border-bottom: 1px solid var(--ipem-grey-border); box-shadow: var(--shadow-lg); display: none; }
  .site-nav.open { display: flex; }
  .site-nav a { padding: 12px 0; border-bottom: 1px solid var(--ipem-grey-border); }
  .site-nav .btn { margin-top: 10px; text-align: center; }
  .nav-toggle { display: block; }
  .feature-grid, .units, .gallery { grid-template-columns: 1fr; }
  .site-footer__grid { grid-template-columns: 1fr; }
  .cta-band, .card { padding: 26px 20px; }
}
