/* Trautmann Immobilien – Landingpage
   Farben: Nacht, Putz, Kalk, Schiefer, Plan, Fensterlicht */

@font-face { font-family: "Inter"; src: url("../fonts/inter-400.woff") format("woff"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Inter"; src: url("../fonts/inter-600.woff") format("woff"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Heros Cn"; src: url("../fonts/heroscn-400.woff") format("woff"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Heros Cn"; src: url("../fonts/heroscn-700.woff") format("woff"); font-weight: 700; font-display: swap; }

:root {
  --hinweis: 4.25rem;            /* Platz für den Netlify-Hinweis unten rechts */
  --nacht: #10161B;
  --nacht-2: #1A242B;
  --putz: #E8E9E5;
  --kalk: #F6F6F3;
  --schiefer: #1B2024;
  --plan: #1D2932;
  --licht: #E9C77F;
  --fg: #F6F6F3;                 /* wird beim Scrollen überblendet */
  --text: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --display: "Heros Cn", "Arial Narrow", "Helvetica Neue", Arial, sans-serif;
  --rand: clamp(1.25rem, 5vw, 5.5rem);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  background: var(--nacht);
  color: var(--kalk);
  font: 400 1.0625rem/1.55 var(--text);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
a { color: inherit; }
h1, h2, h3, p, ol, ul, dl, dd, figure { margin: 0; padding: 0; }
ol, ul { list-style: none; }
:focus-visible { outline: 2px solid var(--licht); outline-offset: 3px; border-radius: 2px; }
.nur-vorlesen { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

/* ---------- Kopfzeile ---------- */
.kopf {
  position: absolute; inset: 0 0 auto 0; z-index: 20;
  display: flex; align-items: center; justify-content: space-between;
  padding: clamp(.9rem, 2.2vh, 1.6rem) var(--rand);
  color: var(--fg);
  transition: color .55s ease;
  pointer-events: none;
}
.kopf > * { pointer-events: auto; }
.kopf .marke { display: block; line-height: 0; }
.kopf .logo { height: clamp(2.1rem, 4.6vh, 2.9rem); width: auto; display: block; }
.kopf nav { display: flex; gap: clamp(1rem, 2.4vw, 2.2rem); font-size: .9375rem; }
.kopf nav a { text-decoration: none; padding: .35rem 0; border-bottom: 1px solid transparent; }
.kopf nav a:hover { border-bottom-color: currentColor; }
@media (max-width: 760px) { .kopf nav a.breit { display: none; } }

/* ---------- Bühne: bleibt stehen, während die Strecke scrollt ---------- */
.strecke { position: relative; height: 700vh; }
.buehne {
  position: sticky; top: 0;
  height: 100vh; height: 100svh;
  overflow: hidden;
  color: var(--fg);
  transition: color .55s ease;
}
html[data-thema="tag"], html[data-thema="kalk"] { --fg: #1B2024; }
html[data-thema="plan"] { --fg: #D5DEE4; }
.grund { position: absolute; inset: 0; transition: opacity .55s ease; }
.grund-tag   { background: var(--putz); }
.grund-kalk  { background: var(--kalk); opacity: 0; }
.grund-plan  {
  opacity: 0;
  background-color: var(--plan);
  background-image:
    linear-gradient(rgba(213,222,228,.055) 1px, transparent 1px),
    linear-gradient(90deg, rgba(213,222,228,.055) 1px, transparent 1px),
    linear-gradient(rgba(213,222,228,.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(213,222,228,.035) 1px, transparent 1px);
  background-size: 120px 120px, 120px 120px, 24px 24px, 24px 24px;
  background-position: center;
}
.grund-nacht { background: linear-gradient(180deg, #0D1216 0%, var(--nacht) 46%, var(--nacht-2) 100%); opacity: 0; }
html[data-thema="nacht"] .grund-nacht, html[data-thema="plan"] .grund-plan, html[data-thema="kalk"] .grund-kalk { opacity: 1; }

/* Zeichnung */
.zeichnung {
  position: absolute;
  right: 0; top: 9vh; bottom: 11vh;
  width: 56vw;
}
#scene { width: 100%; height: 100%; display: block; overflow: visible; }
#scene .heavy { stroke-width: 1.5; }
#scene .hair  { stroke-width: .5; }
#scene .dash  { stroke-dasharray: 3 2.4; }
#scene .fill  { fill: currentColor; stroke: none; }
#scene .solid { fill: none; }
#scene .gap   { stroke: var(--plan); stroke-width: 2; stroke-linecap: butt; }
#scene text   { font: 400 8.2px var(--text); fill: currentColor; stroke: none; letter-spacing: .01em; }
#scene .num   { font: 400 12px var(--display); }
#scene .stp-bg { fill: var(--kalk); }
#scene .stp-t  { font: 600 7.4px var(--text); }
#scene .stp.an .stp-t { fill: var(--kalk); }
#scene #neighbors { stroke-width: .6; }
#scene #stars { opacity: 0; }

/* Textblätter */
.blaetter {
  position: absolute; left: var(--rand); top: 0; bottom: 0;
  width: min(34rem, 37vw);
}
.blatt {
  position: absolute; inset: 0;
  display: flex; flex-direction: column; justify-content: center;
  padding: 12vh 0 13vh;
  opacity: 0;
  pointer-events: none;
  will-change: opacity, transform;
}
.blatt.aktiv { pointer-events: auto; }
.blatt.hell   { color: var(--kalk); }
.blatt.dunkel { color: var(--schiefer); }
.blatt.plan   { color: #DCE4E9; }

.blatt h1, .blatt h2 {
  font-family: var(--display);
  font-weight: 700;
  line-height: .96;
  letter-spacing: -.012em;
  text-wrap: balance;
}
.blatt h1 { font-size: clamp(2.9rem, min(5.5vw, 11vh), 5.6rem); }
.blatt h1 span { white-space: nowrap; }
.blatt h2 { font-size: clamp(2.5rem, min(5.2vw, 9.4vh), 5.2rem); }
.blatt h1 span, .blatt h2 span { display: block; }
.blatt .leise { font-weight: 400; }
.blatt p { margin-top: clamp(1rem, 2.6vh, 1.8rem); max-width: 31rem; text-wrap: pretty; }
.blatt.hell p, .blatt.plan p { color: rgba(246,246,243,.82); }
.blatt.dunkel p { color: #3A4247; }

.knopf {
  display: inline-block;
  margin-top: clamp(1.3rem, 3.4vh, 2.4rem);
  padding: .95rem 1.7rem 1rem;
  font: 600 1rem/1 var(--text);
  text-decoration: none;
  border: 0; border-radius: 2px;
  background: var(--kalk); color: var(--schiefer);
  cursor: pointer;
  transition: background-color .18s ease;
}
.knopf:hover { background: #fff; }
.aktionen { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem 1.6rem; }
.aktionen .tel { margin-top: clamp(1.3rem, 3.4vh, 2.4rem); font-weight: 600; text-decoration: none; border-bottom: 1px solid rgba(246,246,243,.4); padding-bottom: .15rem; }
.aktionen .tel:hover { border-bottom-color: currentColor; }

/* Ankaufsprofil */
.profil { margin-top: clamp(1rem, 2.6vh, 1.8rem); border-top: 1px solid rgba(220,228,233,.28); max-width: 31rem; }
.profil div { display: grid; grid-template-columns: 6.6rem 1fr; gap: 1rem; padding: .62rem 0; border-bottom: 1px solid rgba(220,228,233,.28); }
.profil dt { color: rgba(220,228,233,.62); font-size: .9375rem; }
.profil dd { font-size: 1rem; line-height: 1.4; }

/* Ablauf */
.ablauf { margin-top: clamp(1rem, 2.6vh, 1.8rem); max-width: 30rem; counter-reset: schritt; }
.ablauf li {
  position: relative; padding: .7rem 0 .75rem 2.9rem;
  border-top: 1px solid rgba(27,32,36,.16);
  opacity: .42; transition: opacity .3s ease;
}
.ablauf li:last-child { border-bottom: 1px solid rgba(27,32,36,.16); }
.ablauf li::before {
  counter-increment: schritt; content: counter(schritt);
  position: absolute; left: 0; top: .78rem;
  width: 1.7rem; height: 1.7rem; border-radius: 50%;
  border: 1px solid var(--schiefer);
  font: 600 .8125rem/1.6rem var(--text); text-align: center;
  transition: background-color .3s ease, color .3s ease;
}
.ablauf li.an { opacity: 1; }
.ablauf li.an::before { background: var(--schiefer); color: var(--kalk); }
.ablauf strong { display: block; font-weight: 600; }
.ablauf span { display: block; color: #3A4247; font-size: .9688rem; line-height: 1.45; }

/* Schriftfeld (Plankopf) und Maßkette */
.schriftfeld {
  position: absolute; left: var(--rand); bottom: clamp(1rem, 3.4vh, 2rem);
  display: flex; border: 1px solid currentColor;
  font-size: .75rem; line-height: 1; letter-spacing: .02em;
  opacity: .78;
}
.schriftfeld span { padding: .5rem .7rem; white-space: nowrap; }
.schriftfeld span + span { border-left: 1px solid currentColor; }
.schriftfeld .nr { font-variant-numeric: tabular-nums; }

.kette {
  position: absolute; right: var(--rand); bottom: calc(clamp(1rem, 3.4vh, 2rem) + var(--hinweis));
  display: flex;
}
.kette::before { content: ""; position: absolute; left: 0; right: 0; bottom: 7px; height: 1px; background: currentColor; opacity: .45; }
.kette button {
  position: relative; width: 2.5rem; height: 2.4rem; padding: 0; border: 0; background: none; color: inherit; cursor: pointer;
  font: 400 .75rem/1 var(--text); letter-spacing: .02em;
}
.kette button span {
  position: absolute; left: 50%; bottom: 1.35rem; transform: translateX(-50%);
  opacity: 0; transition: opacity .2s ease; white-space: nowrap;
}
.kette button:hover span, .kette button:focus-visible span { opacity: .85; }
.kette button.an span { opacity: .85; }
.kette:hover button.an:not(:hover) span { opacity: 0; }
.kette button::after {
  content: ""; position: absolute; left: calc(50% - 6px); bottom: 7px; width: 12px; height: 1px;
  background: currentColor; transform: rotate(-45deg);
}
.kette button.an::after { height: 3px; bottom: 6px; }

.weiter {
  position: absolute; left: 50%; bottom: clamp(1rem, 3.4vh, 2rem); transform: translateX(-50%);
  font-size: .75rem; letter-spacing: .02em; text-align: center; opacity: .7;
}
.weiter::after { content: ""; display: block; width: 1px; height: 1.6rem; margin: .45rem auto 0; background: currentColor; transform-origin: top; animation: faden 2.4s ease-in-out infinite; }
@keyframes faden { 0% { transform: scaleY(0); } 55% { transform: scaleY(1); opacity: 1; } 100% { transform: scaleY(1); opacity: 0; } }

/* ---------- Kontakt ---------- */
.kontakt {
  position: relative; z-index: 2;
  background: var(--nacht-2);
  color: var(--kalk);
  padding: clamp(3.5rem, 9vh, 7rem) var(--rand) clamp(3.5rem, 9vh, 6rem);
}
.kontakt-raster { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, .75fr); gap: clamp(2.5rem, 7vw, 7rem); max-width: 78rem; }
.kontakt h2 { font: 700 clamp(2.2rem, 4.2vw, 3.6rem)/1 var(--display); letter-spacing: -.01em; }
.kontakt h3 { font: 600 1rem/1.3 var(--text); margin-bottom: 1.1rem; }
.kontakt .einleitung { margin-top: 1rem; max-width: 33rem; color: rgba(246,246,243,.8); }

form { margin-top: 2.2rem; display: grid; grid-template-columns: 1fr 1fr; gap: 1.15rem 1.25rem; }
.feld { display: flex; flex-direction: column; gap: .4rem; }
.feld.ganz { grid-column: 1 / -1; }
.feld label { font-size: .875rem; color: rgba(246,246,243,.78); }
.feld label em { font-style: normal; color: rgba(246,246,243,.5); }
.feld input, .feld select, .feld textarea {
  width: 100%;
  font: 400 1rem/1.4 var(--text);
  color: var(--kalk);
  background: rgba(246,246,243,.045);
  border: 1px solid rgba(246,246,243,.3);
  border-radius: 2px;
  padding: .78rem .85rem;
  appearance: none; -webkit-appearance: none;
}
.feld select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5l5 5 5-5' fill='none' stroke='%23F6F6F3' stroke-width='1.4'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right .9rem center; background-size: .7rem;
  padding-right: 2.4rem;
}
.feld select option { color: #1B2024; background: #fff; }
.feld textarea { min-height: 9.5rem; resize: vertical; }
.feld input:focus, .feld select:focus, .feld textarea:focus { outline: none; border-color: var(--licht); box-shadow: 0 0 0 1px var(--licht); }
.feld input[aria-invalid="true"], .feld textarea[aria-invalid="true"] { border-color: #E59A84; }
.feld .fehler { font-size: .8438rem; color: #F0B19F; min-height: 0; }
.honig { position: absolute; left: -200vw; }
.form-fuss { grid-column: 1 / -1; display: flex; flex-wrap: wrap; align-items: center; gap: 1rem 1.6rem; margin-top: .3rem; }
.form-fuss .knopf { margin-top: 0; }
.form-fuss p { flex: 1 1 16rem; font-size: .8438rem; line-height: 1.5; color: rgba(246,246,243,.62); }
.meldung { grid-column: 1 / -1; padding: 1rem 1.1rem; border: 1px solid var(--licht); border-radius: 2px; }
.meldung strong { display: block; font-weight: 600; }
.meldung.fehlschlag { border-color: #E59A84; }
.meldung[hidden] { display: none; }

.direkt { padding-top: .35rem; }
.direkt dl { border-top: 1px solid rgba(246,246,243,.22); }
.direkt dl div { padding: .95rem 0; border-bottom: 1px solid rgba(246,246,243,.22); }
.direkt dt { font-size: .875rem; color: rgba(246,246,243,.6); margin-bottom: .2rem; }
.direkt dd { font-size: 1.0625rem; }
.direkt dd a { text-decoration: none; border-bottom: 1px solid rgba(246,246,243,.35); }
.direkt dd a:hover { border-bottom-color: currentColor; }
.direkt .gross { font: 700 clamp(1.7rem, 2.6vw, 2.3rem)/1.1 var(--display); letter-spacing: 0; }

/* ---------- Fuß ---------- */
.fuss {
  position: relative; z-index: 2;
  background: var(--nacht);
  color: rgba(246,246,243,.74);
  padding: 2rem var(--rand) calc(1.4rem + var(--hinweis));
  display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-start; gap: 1rem 2.6rem;
  font-size: .875rem;
}
.fuss .mark { height: 1.9rem; width: auto; display: block; color: var(--kalk); }
.fuss .links { display: flex; align-items: center; gap: 1rem; }
.fuss nav { display: flex; gap: 1.6rem; }
.fuss nav a { text-decoration: none; border-bottom: 1px solid rgba(246,246,243,.3); }
.fuss nav a:hover { color: var(--kalk); border-bottom-color: currentColor; }

/* ---------- Rechtstexte ---------- */
body.recht { background: var(--putz); color: var(--schiefer); }
body.recht .kopf { position: static; color: var(--schiefer); transition: none; }
.rechtstext { max-width: 44rem; padding: clamp(1.5rem, 5vh, 3.5rem) var(--rand) 5rem; }
.rechtstext h1 { font: 700 clamp(2.6rem, 6vw, 4.2rem)/1 var(--display); letter-spacing: -.01em; margin-bottom: 2rem; }
.rechtstext h2 { font: 600 1.125rem/1.35 var(--text); margin: 2.4rem 0 .6rem; }
.rechtstext p, .rechtstext ul { margin: 0 0 .9rem; max-width: 40rem; }
.rechtstext ul { list-style: disc; padding-left: 1.2rem; }
.rechtstext li { margin-bottom: .3rem; }
.rechtstext a { text-underline-offset: .18em; }
.rechtstext .stand { margin-top: 2.6rem; color: #5E666B; font-size: .9375rem; }
.rechtstext .offen { background: #F3E3B8; padding: .05em .3em; border-radius: 2px; }

/* ---------- Schmale Bildschirme ---------- */
@media (max-width: 860px) {
  .zeichnung { left: 0; right: 0; width: auto; top: 8.5vh; top: 8.5svh; bottom: auto; height: 37vh; height: 37svh; }
  .blaetter { left: var(--rand); right: var(--rand); width: auto; top: 46vh; top: 46svh; bottom: 0; }
  .blatt { justify-content: flex-start; padding: 0 0 4.5rem; }
  .blatt h1 { font-size: clamp(2.3rem, min(11.5vw, 6.6vh), 3.4rem); font-size: clamp(2.3rem, min(11.5vw, 6.6svh), 3.4rem); }
  .blatt h2 { font-size: clamp(2.1rem, min(10.4vw, 6vh), 3.1rem); font-size: clamp(2.1rem, min(10.4vw, 6svh), 3.1rem); }
  .blatt p { font-size: 1rem; line-height: 1.5; margin-top: .85rem; }
  .knopf { margin-top: 1.1rem; }
  .aktionen .tel { margin-top: 1.1rem; }
  .profil { margin-top: .85rem; }
  .profil div { grid-template-columns: 5.4rem 1fr; gap: .7rem; padding: .42rem 0; }
  .profil dt, .profil dd { font-size: .9063rem; line-height: 1.35; }
  .ablauf { margin-top: .8rem; }
  .ablauf li { padding: .5rem 0 .55rem 2.5rem; }
  .ablauf li::before { top: .6rem; width: 1.55rem; height: 1.55rem; line-height: 1.45rem; }
  .ablauf strong, .ablauf span { font-size: .9375rem; line-height: 1.38; }
  .kette, .weiter { display: none; }
  .schriftfeld { display: none; }
  .fuss { flex-direction: column; align-items: flex-start; gap: 1.1rem; }
  .schriftfeld span { padding: .42rem .55rem; }
  #scene text { font-size: 10.5px; }
  #scene .num { font-size: 14px; }
  .kontakt-raster { grid-template-columns: 1fr; }
  form { grid-template-columns: 1fr; }
}
@media (max-width: 860px) and (max-height: 720px) {
  .zeichnung { height: 33vh; height: 33svh; top: 9vh; top: 9svh; }
  .blaetter { top: 43vh; top: 43svh; }
  .blatt { padding-bottom: 1rem; }
  .blatt p { font-size: .9375rem; line-height: 1.45; }
  .schriftfeld { display: none; }
  .profil div { padding: .34rem 0; }
  .ablauf li { padding: .4rem 0 .45rem 2.5rem; }
}
@media (min-width: 861px) and (max-height: 620px) {
  .blatt { padding: 10vh 0 12vh; }
  .blatt p { font-size: 1rem; }
}

/* ---------- Ohne JavaScript: Blätter untereinander ---------- */
.no-js .strecke { height: auto; }
.no-js .buehne { position: relative; height: auto; overflow: visible; color: var(--schiefer); padding: 6rem var(--rand) 3rem; }
.no-js .kopf { color: var(--schiefer); }
.no-js .grund-nacht, .no-js .grund-plan, .no-js .grund-kalk, .no-js .kette, .no-js .weiter, .no-js .schriftfeld { display: none; }
.no-js .zeichnung { position: relative; inset: auto; width: 100%; height: 48vh; }
.no-js #tee, .no-js #stars { display: none; }
.no-js .blaetter { position: static; width: auto; max-width: 40rem; }
.no-js .blatt { position: static; opacity: 1; padding: 2.5rem 0; color: var(--schiefer); pointer-events: auto; }
.no-js .blatt p, .no-js .profil dt { color: #3A4247; }
.no-js .profil, .no-js .profil div { border-color: rgba(27,32,36,.2); }
.no-js .knopf { background: var(--schiefer); color: var(--kalk); }
.no-js .ablauf li { opacity: 1; }

@media (prefers-reduced-motion: reduce) {
  .weiter::after { animation: none; }
  .grund, .buehne, .kopf { transition: none; }
  .ablauf li, .ablauf li::before, .knopf { transition: none; }
}
@media print {
  .kopf, .kette, .weiter, .schriftfeld { display: none; }
}
