/* ==========================================================================
   RITTER IMMO — Components
   ========================================================================== */

/* Nav ---------------------------------------------------------------------*/
.nav {
  position: fixed;
  top: var(--site-banner-height, 0); left: 0; right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 22px var(--gutter);
  background: rgba(255,255,255,0);
  border-bottom: 1px solid transparent;
  transition: background var(--dur-fast) var(--ease),
              border-color var(--dur-fast) var(--ease),
              padding var(--dur-fast) var(--ease);
}
.nav.is-scrolled {
  background: rgba(255,255,255,.86);
  backdrop-filter: blur(14px);
  border-bottom-color: var(--stone);
  padding-block: 14px;
}
.nav.is-scrolled.on-dark-page {
  background: rgba(38,44,53,.86);
  border-bottom-color: var(--line-on-dark);
}

.nav__brand { display: flex; align-items: center; gap: 12px; }
.nav__brand img { height: 42px; width: auto; }
.nav__brand-icon { height: 42px; width: auto; display: none; }

.nav__links { display: flex; align-items: center; gap: clamp(20px,2.4vw,44px); }
.nav__links a {
  font-size: .875rem;
  font-weight: 500;
  letter-spacing: .01em;
  position: relative;
  padding-block: 4px;
}
.nav__links a::after {
  content: "";
  position: absolute;
  left: 0; right: 100%;
  bottom: 0;
  height: 1px;
  background: currentColor;
  transition: right var(--dur-fast) var(--ease);
}
.nav__links a:hover::after,
.nav__links a[aria-current="page"]::after { right: 0; }
.nav__links a[aria-current="page"] { color: var(--ink); }

.nav__cta {
  border: 1px solid var(--ink);
  padding: .7em 1.4em;
  font-size: .8125rem;
  font-weight: 600;
  letter-spacing: .02em;
  transition: background var(--dur-fast) var(--ease), color var(--dur-fast) var(--ease);
}
.nav__cta:hover { background: var(--ink); color: var(--paper); }

.nav__toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  width: 26px;
  z-index: 101;
}
.nav__toggle span {
  height: 1.5px;
  background: currentColor;
  transition: transform var(--dur-fast) var(--ease), opacity var(--dur-fast) var(--ease);
}
.nav__mobile {
  position: fixed;
  inset: 0;
  background: var(--ink);
  color: var(--paper);
  z-index: 99;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 28px;
  padding: var(--gutter);
  transform: translateY(-100%);
  transition: transform var(--dur-med) var(--ease);
}
.nav__mobile.is-open { transform: translateY(0); }
.nav__mobile a { font-family: var(--font-display); font-size: clamp(1.6rem,6vw,2.4rem); font-weight: 700; }
.nav__mobile .nav__cta { align-self: flex-start; border-color: var(--paper); }
.nav__mobile .nav__cta:hover { background: var(--paper); color: var(--ink); }

@media (max-width: 860px) {
  .nav__links { display: none; }
  .nav__toggle { display: flex; }
}

/* Skyline divider — the signature motif, drawn from the mark's roofline ---*/
.skyline-rule {
  width: 100%;
  height: clamp(22px, 3vw, 40px);
  color: var(--stone-line);
  display: block;
}
.on-dark .skyline-rule { color: var(--line-on-dark); }
.skyline-rule.subtle { opacity: .55; }

/* Buttons / links -----------------------------------------------------------*/
.btn {
  display: inline-flex;
  align-items: center;
  gap: .8em;
  font-size: .875rem;
  font-weight: 600;
  letter-spacing: .02em;
  padding: 1em 1.8em;
  border: 1px solid var(--ink);
  color: var(--ink);
  transition: background var(--dur-fast) var(--ease), color var(--dur-fast) var(--ease);
}
.btn:hover { background: var(--ink); color: var(--paper); }
.btn--solid { background: var(--ink); color: var(--paper); }
.btn--solid:hover { background: transparent; color: var(--ink); }
.on-dark .btn { border-color: var(--paper); color: var(--paper); }
.on-dark .btn:hover { background: var(--paper); color: var(--ink); }
.on-dark .btn--solid { background: var(--paper); color: var(--ink); }
.on-dark .btn--solid:hover { background: transparent; color: var(--paper); }
.btn svg { width: 16px; height: 16px; transition: transform var(--dur-fast) var(--ease); }
.btn:hover svg { transform: translateX(3px); }

.text-link {
  font-weight: 600;
  font-size: .9375rem;
  display: inline-flex;
  align-items: center;
  gap: .6em;
  border-bottom: 1px solid var(--ink-45);
  padding-bottom: .15em;
  transition: border-color var(--dur-fast) var(--ease);
}
.text-link:hover { border-color: var(--ink); }
.on-dark .text-link { border-color: var(--line-on-dark); }
.on-dark .text-link:hover { border-color: var(--paper); }

/* Blueprint placeholder (used instead of stock/AI photography) -----------*/
.blueprint {
  position: relative;
  width: 100%;
  aspect-ratio: var(--bp-ratio, 4/5);
  background: var(--fog);
  border: 1px solid var(--stone);
  overflow: hidden;
}
.blueprint svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  color: var(--ink-12);
}
.blueprint__tag {
  position: absolute;
  left: 16px;
  bottom: 16px;
  font-size: .6875rem;
  font-weight: 600;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--graphite);
  background: var(--paper);
  padding: .5em .8em;
  border: 1px solid var(--stone);
}
/* Echte Fotos füllen die Kachel, ohne verzerrt zu werden. Ohne diese Regel
   nimmt das Bild die Höhe aus dem height-Attribut (z. B. 1536px) an und
   zeigt nur einen gestreckten oberen Streifen. */
.blueprint--photo img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.blueprint.on-dark-tile { background: var(--ink); border-color: var(--line-on-dark); }
.blueprint.on-dark-tile svg { color: rgba(255,255,255,.08); }

/* Watermark mark ----------------------------------------------------------*/
.watermark {
  position: absolute;
  opacity: .05;
  pointer-events: none;
  z-index: 0;
  user-select: none;
}
.on-dark .watermark { opacity: .07; }

/* Tag / meta pills (square, no shadow) ------------------------------------*/
.tag {
  display: inline-block;
  font-size: .6875rem;
  font-weight: 600;
  letter-spacing: .1em;
  text-transform: uppercase;
  padding: .5em .9em;
  border: 1px solid var(--stone-line);
  color: var(--graphite);
}

/* Form ----------------------------------------------------------------------*/
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.field { display: flex; flex-direction: column; gap: 8px; margin-bottom: 24px; }
.field--full { grid-column: 1 / -1; }
.field label {
  font-size: .75rem;
  font-weight: 600;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--graphite);
}
.field input,
.field textarea,
.field select {
  border: none;
  border-bottom: 1px solid var(--stone-line);
  background: transparent;
  padding: .9em .1em;
  font-size: 1rem;
  transition: border-color var(--dur-fast) var(--ease);
}
.field select { appearance: none; border-radius: 0; }
.field input:focus, .field textarea:focus, .field select:focus {
  border-bottom-color: var(--ink);
  outline: none;
}
.field textarea { resize: vertical; min-height: 120px; }
.field__optional { text-transform: none; letter-spacing: 0; font-weight: 400; }
.form-note { margin: 20px 0 0; padding: 14px 16px; font-size: .9375rem; border-left: 3px solid var(--ink); background: var(--fog); }
.form-note--error { border-left-color: #b8262c; }
/* Sprungziel #kontakt nicht unter der festen Navigation verstecken */
.contact-form { scroll-margin-top: 110px; }
@media (max-width: 700px) { .form-row { grid-template-columns: 1fr; } }

/* Footer --------------------------------------------------------------------*/
.footer {
  background: var(--ink);
  color: var(--paper);
  padding-top: var(--section-y-sm);
}
.footer__top {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: clamp(32px, 4vw, 64px);
  padding-bottom: var(--section-y-sm);
  border-bottom: 1px solid var(--line-on-dark);
}
.footer__brand img { height: 32px; width: auto; margin-bottom: 20px; }
.footer__brand p { color: var(--text-on-dark-70); max-width: 32ch; }
.footer h4 {
  font-family: var(--font-body);
  font-size: .75rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  font-weight: 600;
  color: var(--text-on-dark-45);
  margin-bottom: 18px;
}
.footer__links li { margin-bottom: 12px; }
.footer__links a { color: var(--text-on-dark-70); transition: color var(--dur-fast) var(--ease); }
.footer__links a:hover { color: var(--paper); }
.footer__bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-block: 28px;
  font-size: .8125rem;
  color: var(--text-on-dark-45);
  flex-wrap: wrap;
  gap: 12px;
}
.footer__bottom a:hover { color: var(--paper); }
@media (max-width: 900px) {
  .footer__top { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 560px) {
  .footer__top { grid-template-columns: 1fr; }
}

/* Fließtextbereiche (Impressum, Datenschutz, freie Textblöcke) ------------------------------*/
/* Das Design war ursprünglich nur für handgesetzte Abschnitte gedacht. Sobald
   ein längerer Text eingefügt wird — etwa eine Datenschutzerklärung aus einem
   Generator — kommen Überschriften, Listen und teils auch Tabellen mit, für die
   es bisher keine einzige Regel gab. Ohne diese Formatierung steht solcher Text
   unformatiert und in unlesbaren Spalten da. */

.prose { line-height: 1.7; }

.prose > *:first-child { margin-top: 0; }
.prose > *:last-child  { margin-bottom: 0; }

.prose p { margin: 0 0 1.1em; }

.prose h2 {
  font-family: var(--font-display);
  font-size: clamp(1.25rem, 2.2vw, 1.6rem);
  line-height: 1.25;
  margin: 2.2em 0 .7em;
}
.prose h3 {
  font-family: var(--font-display);
  font-size: clamp(1.05rem, 1.7vw, 1.2rem);
  margin: 1.8em 0 .6em;
}
.prose h4 { font-size: 1rem; font-weight: 650; margin: 1.5em 0 .5em; }

.prose ul, .prose ol { margin: 0 0 1.1em; padding-left: 1.4em; }
.prose li { margin-bottom: .45em; }

.prose a { color: var(--ink); text-decoration: underline; text-underline-offset: 2px; }
.prose a:hover { color: var(--graphite); }

.prose strong { font-weight: 650; }
.prose hr { border: 0; border-top: 1px solid var(--stone); margin: 2em 0; }

.prose blockquote {
  margin: 1.5em 0;
  padding-left: 1.2em;
  border-left: 2px solid var(--stone);
  color: var(--graphite);
}

/* Tabellen: viele Rechtstexte werden als Tabelle eingefügt. Ohne diese Regeln
   laufen sie als unformatierte Spalten aus dem Layout heraus. */
.prose table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.4em 0;
  font-size: .9375rem;
}
.prose th,
.prose td {
  text-align: left;
  vertical-align: top;
  padding: 10px 12px;
  border-bottom: 1px solid var(--stone);
}
.prose th { font-weight: 650; }
.prose tr:last-child td { border-bottom: 0; }

/* Auf schmalen Bildschirmen darf die Tabelle waagerecht rollen, statt das
   restliche Layout auseinanderzudrücken. */
@media (max-width: 640px) {
  .prose table { display: block; overflow-x: auto; }
}
