/* ===========================================================
   JPM Monteurwohnungen — Design Tokens
   Farben: Ink (Graphit), Steel (Schiefer), Paper (Stein-Hell), Amber (Signal)
   Typo: Space Grotesk (Display) / Inter (Text) / IBM Plex Mono (Daten)
   =========================================================== */

:root {
  --ink: #1B2027;
  --ink-soft: #2A313B;
  --steel: #46545F;
  --steel-light: #6B7A85;
  --paper: #EDECE6;
  --paper-raised: #F7F6F2;
  --line: #D6D4C8;
  --amber: #C8862E;
  --amber-dark: #A66E22;
  --white: #FFFFFF;

  /* Bewusst keine extern geladenen Schriften (Google Fonts etc.) — Datenschutz
     & Performance: alle Schriften stammen aus dem lokalen System-Stack,
     die Optik wird stattdessen über Schnitt/Sperrung/Gewicht erzeugt. */
  --font-display: -apple-system, "Helvetica Neue", "Segoe UI", "Arial Narrow", Arial, sans-serif;
  --font-body: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-mono: ui-monospace, "SFMono-Regular", "Cascadia Mono", "Consolas", "Liberation Mono", monospace;

  --radius: 2px;
  --shadow: 0 10px 30px -12px rgba(27, 32, 39, 0.35);
  --container: 1180px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; }
}

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

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

a { color: inherit; }

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

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 800;
  line-height: 1.06;
  margin: 0 0 0.4em;
  letter-spacing: -0.02em;
}

h1 { font-size: clamp(2.2rem, 5vw, 3.6rem); }
h2 { font-size: clamp(1.7rem, 3.6vw, 2.5rem); }
h3 { font-size: clamp(1.2rem, 2.2vw, 1.5rem); font-weight: 700; }

p { margin: 0 0 1em; color: var(--steel); }

.eyebrow {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--amber-dark);
  display: block;
  margin-bottom: 0.7em;
}

/* ---------- Header / Nav ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--ink);
  color: var(--white);
  border-bottom: 1px solid rgba(255,255,255,0.08);
}
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 24px;
  max-width: var(--container);
  margin: 0 auto;
}
.logo {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.15rem;
  color: var(--white);
  text-decoration: none;
  letter-spacing: 0.01em;
  display: flex;
  align-items: baseline;
  gap: 8px;
}
.logo span {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--amber);
  letter-spacing: 0.1em;
}
.nav-links {
  display: flex;
  gap: 28px;
  list-style: none;
  margin: 0;
  padding: 0;
}
.nav-links a {
  text-decoration: none;
  color: rgba(255,255,255,0.82);
  font-size: 0.92rem;
  font-weight: 500;
  transition: color 0.15s;
}
.nav-links a:hover, .nav-links a.active { color: var(--amber); }
.nav-cta {
  background: var(--amber);
  color: var(--ink) !important;
  padding: 9px 18px;
  border-radius: var(--radius);
  font-weight: 700 !important;
}
.nav-cta:hover { background: var(--amber-dark); color: var(--white) !important; }
.nav-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--white);
  font-size: 1.6rem;
  cursor: pointer;
}

@media (max-width: 860px) {
  .nav-toggle { display: block; }
  .nav-links {
    position: absolute;
    top: 100%;
    left: 0; right: 0;
    background: var(--ink);
    flex-direction: column;
    gap: 0;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.25s ease;
  }
  .nav-links.open { max-height: 400px; }
  .nav-links li { border-top: 1px solid rgba(255,255,255,0.08); }
  .nav-links a { display: block; padding: 16px 24px; }
  .nav-cta { display: inline-block; margin: 16px 24px; }
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  min-height: 78vh;
  display: flex;
  align-items: flex-end;
  color: var(--white);
  background-size: cover;
  background-position: center;
}
.hero::after {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(27,32,39,0.25) 0%, rgba(27,32,39,0.55) 60%, rgba(27,32,39,0.92) 100%);
}
.hero-inner {
  position: relative;
  z-index: 1;
  padding: 64px 24px 56px;
  max-width: var(--container);
  margin: 0 auto;
  width: 100%;
}
.hero h1 { color: var(--white); max-width: 16ch; }
.hero-lead { color: rgba(255,255,255,0.85); font-size: 1.1rem; max-width: 46ch; }
.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 26px; }

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 13px 26px;
  border-radius: var(--radius);
  text-decoration: none;
  font-weight: 700;
  font-size: 0.95rem;
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.15s;
}
.btn-primary { background: var(--amber); color: var(--ink); }
.btn-primary:hover { background: var(--amber-dark); }
.btn-ghost { border-color: rgba(255,255,255,0.5); color: var(--white); }
.btn-ghost:hover { border-color: var(--white); background: rgba(255,255,255,0.08); }
.btn-dark { background: var(--ink); color: var(--white); }
.btn-dark:hover { background: var(--ink-soft); }

/* ---------- Section basics ---------- */
section { padding: 84px 0; }
.section-tight { padding: 56px 0; }
.section-head { max-width: 640px; margin-bottom: 48px; }
.bg-raised { background: var(--paper-raised); }
.bg-ink { background: var(--ink); color: var(--white); }
.bg-ink .eyebrow { color: var(--amber); }
.bg-ink p { color: rgba(255,255,255,0.72); }
.bg-ink h2, .bg-ink h3 { color: var(--white); }

/* ---------- Object overview cards ---------- */
.object-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}
@media (max-width: 900px) { .object-grid { grid-template-columns: 1fr; } }

.object-card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  text-decoration: none;
  color: var(--ink);
  display: flex;
  flex-direction: column;
  transition: transform 0.2s, box-shadow 0.2s;
}
.object-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.object-card img { height: 230px; object-fit: cover; width: 100%; }
.object-card-body { padding: 22px 22px 26px; flex: 1; display: flex; flex-direction: column; }
.object-card .loc {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--amber-dark);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 8px;
}
.object-card h3 { margin-bottom: 10px; }
.object-card p { font-size: 0.93rem; flex: 1; }
.object-card .arrow { font-family: var(--font-mono); font-size: 0.85rem; font-weight: 700; margin-top: 12px; }

/* ---------- Typenschild / Spec Plate ---------- */
.plate {
  background: var(--ink);
  color: var(--white);
  border-radius: var(--radius);
  padding: 26px 26px 22px;
  position: relative;
  border: 1px solid rgba(255,255,255,0.1);
}
.plate::before, .plate::after {
  content: "";
  position: absolute;
  width: 7px; height: 7px;
  border-radius: 50%;
  background: rgba(255,255,255,0.25);
  top: 12px;
}
.plate::before { left: 12px; }
.plate::after { right: 12px; }
.plate-title {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--amber);
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px dashed rgba(255,255,255,0.2);
}
.plate-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px 20px;
}
.plate-item dt {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: rgba(255,255,255,0.5);
  margin-bottom: 3px;
}
.plate-item dd {
  margin: 0;
  font-family: var(--font-mono);
  font-size: 1.05rem;
  font-weight: 500;
}

/* ---------- Amenity list ---------- */
.amenity-list {
  list-style: none;
  margin: 0; padding: 0;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px 24px;
}
.amenity-list li {
  padding-left: 20px;
  position: relative;
  font-size: 0.95rem;
  color: var(--steel);
}
.amenity-list li::before {
  content: "";
  position: absolute; left: 0; top: 0.55em;
  width: 8px; height: 8px;
  background: var(--amber);
}
@media (max-width: 560px) { .amenity-list { grid-template-columns: 1fr; } }

/* ---------- Unit block (Herdweg/Buchenstraße Untereinheiten) ---------- */
.unit-block {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--white);
  padding: 40px;
  margin-bottom: 40px;
  scroll-margin-top: 90px;
}
@media (max-width: 640px) {
  .unit-block { padding: 24px 18px; }
  .form-wrap { padding: 26px 20px; }
  section { padding: 56px 0; }
}
.unit-block-header { display: flex; align-items: baseline; gap: 14px; flex-wrap: wrap; margin-bottom: 8px; }
.unit-tag {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  background: var(--paper);
  border: 1px solid var(--line);
  padding: 3px 10px;
  border-radius: 3px;
  letter-spacing: 0.06em;
}
.unit-layout { display: grid; grid-template-columns: 1.3fr 1fr; gap: 40px; margin-top: 24px; }
@media (max-width: 860px) { .unit-layout { grid-template-columns: 1fr; } }

/* ---------- Gallery ---------- */
.gallery {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}
.gallery img {
  width: 100%;
  height: 130px;
  object-fit: cover;
  cursor: zoom-in;
  transition: opacity 0.15s;
}
.gallery img:hover { opacity: 0.85; }
@media (max-width: 640px) {
  .gallery { grid-template-columns: repeat(3, 1fr); }
  .gallery img { height: 100px; }
}

.gallery-hero {
  width: 100%;
  height: 420px;
  object-fit: cover;
  border-radius: var(--radius);
  margin-bottom: 8px;
  cursor: zoom-in;
}
@media (max-width: 640px) { .gallery-hero { height: 260px; } }

/* ---------- Lightbox ---------- */
.lightbox {
  position: fixed; inset: 0;
  background: rgba(15,17,20,0.94);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 24px;
}
.lightbox.open { display: flex; }
.lightbox img { max-width: 92vw; max-height: 86vh; object-fit: contain; }
.lightbox-close {
  position: absolute; top: 14px; right: 14px;
  background: rgba(255,255,255,0.08); border: none; color: var(--white);
  font-size: 1.8rem; cursor: pointer; line-height: 1;
  width: 44px; height: 44px; border-radius: 50%;
}
.lightbox-nav {
  position: absolute; top: 50%; transform: translateY(-50%);
  background: rgba(255,255,255,0.1); border: none; color: var(--white);
  font-size: 1.8rem; cursor: pointer;
  width: 48px; height: 48px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
}
.lightbox-prev { left: 10px; }
.lightbox-next { right: 10px; }
@media (max-width: 640px) {
  .lightbox-nav { width: 42px; height: 42px; font-size: 1.5rem; }
}

/* ---------- Region / feature split ---------- */
.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 56px;
  align-items: center;
}
@media (max-width: 860px) { .split { grid-template-columns: 1fr; gap: 32px; } }
.split img { border-radius: var(--radius); width: 100%; height: 420px; object-fit: cover; }

/* ---------- Form ---------- */
.form-wrap {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 40px;
}
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px 20px;
}
.form-grid .full { grid-column: 1 / -1; }
@media (max-width: 640px) { .form-grid { grid-template-columns: 1fr; } }

label {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--steel);
  margin-bottom: 6px;
}
input, select, textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 2px;
  font-family: var(--font-body);
  font-size: 16px; /* verhindert automatisches Zoomen auf iOS bei Fokus */
  background: var(--paper-raised);
  color: var(--ink);
}
input:focus, select:focus, textarea:focus {
  outline: 2px solid var(--amber);
  outline-offset: 1px;
}
textarea { resize: vertical; min-height: 110px; }
.form-note { font-size: 0.85rem; color: var(--steel-light); margin-top: 14px; }

.field-error {
  display: none;
  color: #B8442A;
  font-size: 0.8rem;
  margin-top: 5px;
  font-family: var(--font-body);
  text-transform: none;
  letter-spacing: 0;
}
.field.has-error input,
.field.has-error select,
.field.has-error textarea { border-color: #B8442A; outline: 2px solid #B8442A33; }
.field.has-error .field-error { display: block; }

.checkbox-row { display: flex; align-items: flex-start; gap: 10px; }
.checkbox-row input[type="checkbox"] { width: auto; margin-top: 3px; flex-shrink: 0; }
.checkbox-row label { text-transform: none; font-family: var(--font-body); font-size: 0.92rem; color: var(--ink); letter-spacing: 0; }
.checkbox-row a { color: var(--amber-dark); font-weight: 600; }

.hp-field { position: absolute; left: -9999px; top: -9999px; opacity: 0; height: 0; overflow: hidden; }

.form-success, .form-error-banner {
  display: none;
  text-align: center;
  padding: 48px 24px;
}
.form-success.show, .form-error-banner.show { display: block; }
.form-success .icon {
  width: 56px; height: 56px;
  border-radius: 50%;
  background: var(--amber);
  color: var(--ink);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.6rem; font-weight: 800;
  margin: 0 auto 18px;
}
.form-error-banner {
  background: #FBEAE5;
  border: 1px solid #E3B4A6;
  border-radius: var(--radius);
  margin-top: 18px;
  padding: 20px 22px;
}
.btn[disabled] { opacity: 0.6; cursor: not-allowed; }

/* ---------- Lagekarte (ohne externe Einbettung) ---------- */
.location-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--white);
}
.location-visual {
  position: relative;
  height: 200px;
  background: var(--ink);
  background-image:
    linear-gradient(rgba(200,134,46,0.12) 1px, transparent 1px),
    linear-gradient(90deg, rgba(200,134,46,0.12) 1px, transparent 1px);
  background-size: 28px 28px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.location-pin {
  width: 20px; height: 20px;
  background: var(--amber);
  border-radius: 50% 50% 50% 0;
  transform: rotate(-45deg);
  box-shadow: 0 0 0 6px rgba(200,134,46,0.18);
}
.location-body { padding: 22px 24px 24px; }
.location-address {
  font-family: var(--font-mono);
  font-size: 0.95rem;
  margin-bottom: 4px;
}
.location-hint { font-size: 0.85rem; color: var(--steel-light); margin-bottom: 18px; }
.location-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.location-actions .btn { padding: 10px 16px; font-size: 0.85rem; }

/* ---------- Hinweisboxen in rechtlichen Texten ---------- */
.todo-note {
  background: #FBF2E2;
  border-left: 3px solid var(--amber);
  padding: 14px 18px;
  font-size: 0.9rem;
  margin: 16px 0 28px;
  border-radius: 0 2px 2px 0;
}
.todo-note strong { color: var(--amber-dark); }
.legal-note {
  background: var(--paper-raised);
  border: 1px solid var(--line);
  padding: 16px 20px;
  font-size: 0.88rem;
  border-radius: var(--radius);
  color: var(--steel);
  margin-bottom: 32px;
}

/* ---------- Partner-Empfehlung (z. B. StaffSpring) ---------- */
.partner-section { padding: 76px 0; }
.partner-card {
  max-width: 720px;
  margin: 0 auto;
  text-align: center;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 48px 40px;
}
.partner-badge {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--steel);
  background: var(--paper);
  border: 1px solid var(--line);
  padding: 5px 12px;
  border-radius: 20px;
  margin-bottom: 18px;
}
.partner-card .btn { margin-top: 6px; }
.partner-disclaimer {
  font-size: 0.82rem;
  color: var(--steel-light);
  margin: 18px 0 0;
}
.ext-link-icon { font-size: 0.85em; margin-left: 2px; }
@media (max-width: 640px) {
  .partner-card { padding: 34px 22px; }
}

/* ---------- WhatsApp Floating Button ---------- */
.whatsapp-float {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 200;
  width: 58px;
  height: 58px;
  border-radius: 50%;
  background: #25D366;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 22px -4px rgba(0,0,0,0.35);
  text-decoration: none;
  transition: transform 0.15s ease;
}
.whatsapp-float:hover { transform: scale(1.06); }
.whatsapp-float svg { width: 30px; height: 30px; fill: #fff; }
@media (max-width: 640px) {
  .whatsapp-float { right: 16px; bottom: 16px; width: 52px; height: 52px; }
  .whatsapp-float svg { width: 27px; height: 27px; }
}

/* ---------- Footer ---------- */
.site-footer {
  background: var(--ink);
  color: rgba(255,255,255,0.7);
  padding: 56px 0 28px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 40px;
}
@media (max-width: 700px) { .footer-grid { grid-template-columns: 1fr; gap: 28px; } }
.footer-grid h4 {
  color: var(--white);
  font-family: var(--font-mono);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 14px;
}
.footer-grid ul { list-style: none; margin: 0; padding: 0; }
.footer-grid li { margin-bottom: 8px; font-size: 0.92rem; }
.footer-grid a { text-decoration: none; color: rgba(255,255,255,0.7); }
.footer-grid a:hover { color: var(--amber); }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.1);
  padding-top: 22px;
  font-size: 0.82rem;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
}

/* ---------- Breadcrumb / page hero small ---------- */
.page-hero {
  padding: 52px 0 40px;
  border-bottom: 1px solid var(--line);
}
.page-hero .eyebrow { margin-bottom: 10px; }

/* ---------- Utility ---------- */
.mt-0 { margin-top: 0; }
.text-center { text-align: center; }
.max-prose { max-width: 62ch; }
