/* HAAG Immobilienverwaltung, Homepage
   Farben nach dem Corporate Design Manual (Terrakotta, Navy, Creme), Schrift: Systemschriften,
   damit keine Schriftdateien von fremden Servern geladen werden. */

:root {
  --terrakotta: #7F3528;   /* Markenfarbe: Logo, Knöpfe, Akzente */
  --navy: #0A4054;         /* Überschriften */
  --text: #22292E;         /* Fließtext */
  --grau: #5C554E;         /* Nebentext, Kontrast 7:1 auf Hintergrund */
  --linie: #E7E1D8;        /* Haarlinien */
  --grund: #FCF7F1;        /* Seitenhintergrund, helles Creme */
  --flaeche: #FFFFFF;      /* Karten, Formulare */
  --fehler: #A1271B;
  --schrift: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --breite: 1080px;
  --lesebreite: 720px;
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--grund);
  color: var(--text);
  font: 400 1rem/1.55 var(--schrift);
}

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

a { color: var(--terrakotta); text-underline-offset: 0.15em; }
a:hover { text-decoration-thickness: 2px; }

:focus-visible { outline: 3px solid var(--navy); outline-offset: 2px; border-radius: 2px; }

h1, h2, h3 { color: var(--navy); line-height: 1.2; font-weight: 700; margin: 0 0 0.6em; }
h1 { font-size: clamp(1.75rem, 1.2rem + 2.2vw, 2.6rem); letter-spacing: -0.01em; }
h2 { font-size: 1.4rem; margin-top: 1.8em; }
h3 { font-size: 1.1rem; margin-top: 1.4em; }
h4 { font-size: 1rem; margin: 1.2em 0 0.4em; color: var(--navy); }
p, ul, ol { margin: 0 0 1em; }

.sprung { position: absolute; left: -9999px; }
.sprung:focus { left: 16px; top: 8px; background: var(--flaeche); padding: 8px 12px; z-index: 10; }

/* Kopfbereich */
.kopf { background: var(--flaeche); border-bottom: 1px solid var(--linie); }
.kopf-innen {
  max-width: var(--breite); margin: 0 auto; padding: 14px 16px;
  display: flex; align-items: center; gap: 24px; flex-wrap: wrap;
}
.logo img { width: 200px; height: auto; }
.menue { display: flex; align-items: center; gap: 20px; margin-left: auto; flex-wrap: wrap; }
.menue ul { list-style: none; display: flex; gap: 4px 18px; margin: 0; padding: 0; flex-wrap: wrap; }
.menue ul a { color: var(--text); text-decoration: none; padding: 6px 0; display: inline-block; border-bottom: 2px solid transparent; }
.menue ul a:hover { color: var(--terrakotta); }
.menue ul a[aria-current="page"] { color: var(--terrakotta); border-bottom-color: var(--terrakotta); }
.menue-knopf { display: none; }

@media (max-width: 860px) {
  .js .menue-knopf {
    display: inline-block; margin-left: auto; font: inherit; font-weight: 600;
    background: none; border: 1px solid var(--linie); border-radius: 6px; padding: 6px 14px; color: var(--navy);
  }
  .js .menue { display: none; width: 100%; }
  .js .menue.offen { display: block; }
  .menue ul { flex-direction: column; gap: 0; }
  .menue ul a { padding: 10px 0; width: 100%; border-bottom: 1px solid var(--linie); }
  .menue ul a[aria-current="page"] { border-bottom-color: var(--linie); font-weight: 600; }
  .menue .knopf { margin: 14px 0 4px; }
  .logo img { width: 170px; }
}

/* Knöpfe */
.knopf {
  display: inline-block; background: var(--terrakotta); color: #fff; text-decoration: none;
  font-weight: 600; padding: 12px 22px; border-radius: 6px; border: 0; cursor: pointer; font-size: 1rem;
}
.knopf:hover { background: #6A2B20; }
.knopf-klein { padding: 8px 16px; }
.knopf-hell { background: var(--flaeche); color: var(--terrakotta); border: 1px solid var(--terrakotta); }
.knopf-hell:hover { background: var(--grund); }

/* Inhalt */
.bereich { max-width: var(--breite); margin: 0 auto; padding: 48px 16px; }
.lesetext { max-width: var(--lesebreite); }
.kicker { text-transform: uppercase; letter-spacing: 0.08em; font-size: 0.8rem; font-weight: 600; color: var(--terrakotta); margin-bottom: 0.5em; }
.einleitung { font-size: 1.15rem; color: var(--grau); }

/* Startseite */
.start { display: grid; grid-template-columns: 1.2fr 1fr; gap: 48px; align-items: center; }
.portrait { background: var(--flaeche); border: 1px solid var(--linie); border-radius: 8px; overflow: hidden; }
.portrait figcaption { padding: 14px 18px; border-top: 3px solid var(--terrakotta); }
.portrait figcaption strong { display: block; color: var(--navy); font-size: 1.1rem; }
.portrait figcaption span { color: var(--grau); }
.zitat {
  margin: 32px 0 0; padding: 4px 0 4px 20px; border-left: 3px solid var(--terrakotta);
  font-size: 1.2rem; font-style: italic; color: var(--navy);
}
.karten { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.karte {
  background: var(--flaeche); border: 1px solid var(--linie); border-radius: 8px; padding: 22px;
  display: flex; flex-direction: column;
}
.karte h2, .karte h3 { margin-top: 0; font-size: 1.15rem; }
.karte p { color: var(--grau); flex: 1; }
.karte a.weiter { font-weight: 600; text-decoration: none; }
.karte a.weiter::after { content: " \2192"; }

@media (max-width: 860px) {
  .start { grid-template-columns: 1fr; gap: 32px; }
  .start .portrait { max-width: 420px; }
  .karten { grid-template-columns: 1fr; }
}

/* Zweispaltige Inhaltsseiten (Kundenportal, ETV) */
.zweispaltig { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: start; }
@media (max-width: 860px) { .zweispaltig { grid-template-columns: 1fr; gap: 24px; } }
.kasten { background: var(--flaeche); border: 1px solid var(--linie); border-radius: 8px; padding: 22px; margin-bottom: 20px; }
.kasten h2 { margin-top: 0; font-size: 1.15rem; }
.apps { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }
.apps img { height: 44px; width: auto; }

/* ETV: Film im Bildschirm-Rahmen. Die Bildschirmfläche liegt im Rahmenbild bei
   2,1 % / 3,8 % (links/oben) und ist 96 % breit, 60,8 % hoch. */
.etv-kopf { align-items: center; }
.monitor { margin: 0; }
.monitor-rahmen { position: relative; }
.monitor-video {
  position: absolute; left: 2.1%; top: 3.8%; width: 96%; height: 60.8%;
  object-fit: cover; background: #fff;
}
.monitor-rahmen img { position: relative; pointer-events: none; }
.monitor figcaption { display: flex; justify-content: space-between; align-items: center; gap: 12px; color: var(--grau); font-size: 0.9rem; margin-top: -5%; flex-wrap: wrap; position: relative; }
.video-knopf { font: inherit; background: none; border: 1px solid var(--linie); border-radius: 6px; padding: 4px 12px; color: var(--navy); cursor: pointer; }
.video-knopf:hover { border-color: var(--navy); }
.schritte { list-style: none; padding: 0; margin: 0; counter-reset: schritt; }
.schritte .karte { counter-increment: schritt; }
.schritte .karte h3::before {
  content: counter(schritt); display: inline-grid; place-items: center; width: 1.7em; height: 1.7em; margin-right: 10px;
  border-radius: 50%; background: var(--terrakotta); color: #fff; font-size: 0.85em;
}

/* Downloadbereich */
.downloads { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; list-style: none; padding: 0; }
.downloads a { display: block; text-decoration: none; color: var(--text); background: var(--flaeche); border: 1px solid var(--linie); border-radius: 8px; overflow: hidden; height: 100%; }
.downloads a:hover { border-color: var(--terrakotta); }
.downloads img { border-bottom: 1px solid var(--linie); aspect-ratio: 360 / 509; object-fit: cover; }
.downloads span { display: block; padding: 12px 16px; }
.downloads strong { color: var(--navy); display: block; }
.downloads small { color: var(--grau); }
@media (max-width: 700px) { .downloads { grid-template-columns: 1fr 1fr; gap: 14px; } }

/* Formulare */
.formular { background: var(--flaeche); border: 1px solid var(--linie); border-radius: 8px; padding: 24px; max-width: var(--lesebreite); }
.felder { display: grid; grid-template-columns: 1fr 1fr; gap: 16px 20px; }
.feld { display: flex; flex-direction: column; gap: 6px; }
.feld.breit { grid-column: 1 / -1; }
.feld label { font-weight: 600; font-size: 0.95rem; }
.feld .pflicht { color: var(--terrakotta); }
.feld input, .feld textarea {
  font: inherit; color: var(--text); background: #fff; padding: 10px 12px;
  border: 1px solid #B9B1A6; border-radius: 6px; width: 100%;
}
.feld textarea { min-height: 140px; resize: vertical; }
.feld input:focus, .feld textarea:focus { outline: 3px solid var(--navy); outline-offset: 0; border-color: var(--navy); }
.feld small { color: var(--grau); }
@media (max-width: 600px) { .felder { grid-template-columns: 1fr; } }
.haken { display: flex; gap: 10px; align-items: flex-start; margin: 18px 0; }
.haken input { width: 20px; height: 20px; margin-top: 2px; flex: none; accent-color: var(--terrakotta); }
.hinweis { font-size: 0.9rem; color: var(--grau); }
.honigtopf { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.einwilligungstext { font-size: 0.92rem; background: var(--grund); border: 1px solid var(--linie); border-radius: 6px; padding: 16px 18px; max-height: 340px; overflow-y: auto; margin-top: 8px; }
.einwilligungstext h3 { font-size: 0.98rem; margin-top: 1em; }
.einwilligungstext h3:first-child { margin-top: 0; }

/* Rechtstexte */
.rechtstext { max-width: var(--lesebreite); overflow-wrap: anywhere; }
.rechtstext h2 { font-size: 1.25rem; }
.entwurf { background: #FFF4D6; border: 1px solid #E5C76B; border-radius: 6px; padding: 12px 16px; margin-bottom: 24px; }

/* Fußbereich */
.fuss { background: var(--flaeche); border-top: 1px solid var(--linie); margin-top: 32px; }
.fuss-innen {
  max-width: var(--breite); margin: 0 auto; padding: 32px 16px;
  display: grid; grid-template-columns: 1.5fr 1fr auto; gap: 24px; align-items: center; font-size: 0.95rem;
}
.fuss-adresse strong { color: var(--navy); }
.fuss-siegel { display: flex; gap: 20px; align-items: center; }
.fuss-siegel img[src*="vdiv"] { width: 120px; }
.fuss-siegel img[src*="fortbildung"] { width: 80px; }
.fuss-links { display: flex; flex-direction: column; gap: 6px; }
@media (max-width: 760px) { .fuss-innen { grid-template-columns: 1fr; } .fuss-links { flex-direction: row; gap: 18px; flex-wrap: wrap; } }

@media print {
  .kopf nav, .menue-knopf, .fuss-siegel { display: none; }
  body { background: #fff; }
}
