/* Kontaktformular Baufinanz Düren – Raleway lokal (keine Verbindung zu Google) */
@font-face { font-family: 'Raleway'; font-weight: 400; font-display: swap; src: url('assets/fonts/raleway-400.woff2') format('woff2'); }
@font-face { font-family: 'Raleway'; font-weight: 500; font-display: swap; src: url('assets/fonts/raleway-500.woff2') format('woff2'); }
@font-face { font-family: 'Raleway'; font-weight: 600; font-display: swap; src: url('assets/fonts/raleway-600.woff2') format('woff2'); }
@font-face { font-family: 'Raleway'; font-weight: 700; font-display: swap; src: url('assets/fonts/raleway-700.woff2') format('woff2'); }
@font-face { font-family: 'Raleway'; font-weight: 800; font-display: swap; src: url('assets/fonts/raleway-800.woff2') format('woff2'); }

:root {
  --primary: #1A3569;   /* Dunkelblau: Knöpfe, Überschriften */
  --secondary: #3C59AD; /* Blau: Fokus, Icon-Kreis */
  --text: #191919;
  --heading: #2b2b2b;
  --muted: #7C829A;
  --line: #e3e3e3;
  --field: #c9c9c9;
  --req: #c62828;       /* „(erforderlich)“ */
  --disabled-bg: #e6e6e6;
  --disabled-text: #a6a6a6;
  --white: #fff;
  --font: 'Raleway', system-ui, -apple-system, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--white); color: var(--text); font-family: var(--font); font-size: 17px; line-height: 1.5; font-variant-numeric: lining-nums; }
[hidden] { display: none !important; }

.page { max-width: 680px; margin: 0 auto; padding: calc(48px + env(safe-area-inset-top)) 20px calc(80px + env(safe-area-inset-bottom)); }

/* Einleitung */
.intro { margin-bottom: 56px; }
.intro p { margin: 0 0 16px; font-size: 17px; line-height: 1.6; }
.intro-lead { font-weight: 700; }

/* Schritte */
.step { padding-top: 24px; transition: opacity .3s; }
.step.done { opacity: .35; pointer-events: none; }
.step.done .nav, .step.done .hint, .step.done .privacy { display: none; }
.step.done .req { visibility: hidden; }

.label { display: block; margin-bottom: 14px; color: var(--heading); font-size: 30px; font-weight: 500; line-height: 1.25; letter-spacing: -.01em; }
.req { position: relative; top: -.7em; margin-left: 12px; color: var(--req); font-size: 15px; font-weight: 500; letter-spacing: 0; white-space: nowrap; }

input[type=text], input[type=email], input[type=tel], input[type=password] {
  display: block; width: 100%; height: 56px; padding: 0 16px;
  border: 1px solid var(--field); border-radius: 6px; background: var(--white);
  color: var(--text); font: inherit; font-size: 18px; /* ≥16px: kein Zoom am iPhone */
  -webkit-appearance: none; appearance: none;
}
input:focus { outline: none; border: 2px solid var(--primary); padding: 0 15px; }
input.invalid { border-color: var(--req); }

.hint { min-height: 22px; margin: 8px 0 0; color: var(--req); font-size: 14px; font-weight: 500; }

.nav { display: flex; justify-content: center; gap: 24px; margin-top: 18px; padding-top: 52px; border-top: 1px solid var(--line); }

/* Knöpfe im Formular (eckig wie das Original) */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-width: 150px; height: 56px; padding: 0 28px;
  border: 1px solid transparent; border-radius: 6px; font: inherit; font-size: 20px; font-weight: 600; cursor: pointer; transition: background .2s, color .2s, transform .2s; }
.btn-back { background: var(--white); border-color: var(--field); color: var(--primary); }
.btn-next, .btn-submit { min-width: 172px; background: var(--primary); color: var(--white); }
.btn:disabled { background: var(--disabled-bg); border-color: var(--disabled-bg); color: var(--disabled-text); cursor: not-allowed; }
.btn:not(:disabled):hover { transform: translateY(-1px); }
.btn:focus-visible { outline: 3px solid rgba(60,89,173,.35); outline-offset: 2px; }
.btn-submit.sending { opacity: .7; cursor: progress; }

.privacy { margin: 20px 0 0; color: var(--muted); font-size: 14px; text-align: center; }
.privacy a { color: var(--primary); }
.send-error { margin: 16px 0 0; color: var(--req); font-weight: 600; text-align: center; }

.hp { position: absolute; left: -9999px; }

/* Danke-Seite */
#danke { min-height: 70vh; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; outline: none; }
#danke h1 { max-width: 520px; margin: 0 0 10px; color: var(--primary); font-size: 46px; font-weight: 400; line-height: 1.15; letter-spacing: -.03em; }
#danke p { margin: 0 0 36px; font-size: 19px; }

/* Pillen-Knopf mit rundem Icon (Hauptseite) */
.btn-pill { display: inline-flex; align-items: center; gap: 26px; padding: 12px 12px 12px 44px; border-radius: 120px; background: var(--primary); color: var(--white);
  font-size: 20px; font-weight: 700; text-decoration: none; transition: transform .3s; }
.btn-pill:hover { transform: scale(1.03); }
.btn-pill-icon { display: grid; place-items: center; width: 76px; height: 76px; border-radius: 50%; background: var(--secondary); }
.btn-pill-icon svg { width: 26px; height: 26px; color: var(--white); }

/* Cookie-Einstellungen (runder Knopf unten links, nur wenn ein Pixel eingetragen ist) */
#cookie-btn { position: fixed; left: 16px; bottom: calc(16px + env(safe-area-inset-bottom)); z-index: 900; display: grid; place-items: center; width: 44px; height: 44px;
  border: 0; border-radius: 50%; background: var(--white); box-shadow: 0 2px 10px rgba(0,0,0,.18); cursor: pointer; }
#cookie-btn svg { width: 24px; height: 24px; color: #555; }

/* Einwilligungs-Hinweis: „Ablehnen“ und „Erlauben“ gleich groß und gleich gestaltet */
#consent { position: fixed; left: 16px; right: 16px; bottom: calc(16px + env(safe-area-inset-bottom)); z-index: 1000; max-width: 720px; margin: 0 auto; padding: 18px 20px;
  border-radius: 16px; background: var(--white); box-shadow: 0 10px 40px rgba(28,35,80,.28); font-size: 14px; line-height: 1.5; }
#consent p { margin: 0 0 14px; }
#consent a { color: var(--secondary); }
.consent-buttons { display: flex; gap: 10px; }
.consent-buttons button { flex: 1; padding: 11px 16px; border: 2px solid var(--primary); border-radius: 999px; background: var(--white); color: var(--primary); font: inherit; font-weight: 700; cursor: pointer; }

/* Schloss unten rechts: Zugang zu den Einstellungen, kaum sichtbar (wie Anmeldeseite) */
.admin-link { position: fixed; right: calc(8px + env(safe-area-inset-right)); bottom: calc(8px + env(safe-area-inset-bottom)); z-index: 800; display: flex; align-items: center; justify-content: center; width: 36px; height: 36px; color: var(--muted); opacity: .15; transition: opacity .3s; }
.admin-link svg { width: 14px; height: 14px; }
.admin-link:hover, .admin-link:focus-visible { opacity: .7; }

@media (max-width: 480px) {
  .page { padding-top: calc(36px + env(safe-area-inset-top)); }
  .label { font-size: 27px; }
  .btn { min-width: 0; flex: 1; max-width: 190px; font-size: 18px; padding: 0 16px; }
  .nav { gap: 16px; }
  #danke h1 { font-size: 36px; }
  .btn-pill { gap: 18px; padding-left: 32px; font-size: 18px; }
  .btn-pill-icon { width: 60px; height: 60px; }
}

@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }
