/* ==================================================================
   Maklerunterlagen.de – Design-System
   Fonts: Bricolage Grotesque (Display), Instrument Sans (UI), JetBrains Mono (Labels)
   Alle Werte pixelnah aus der Designvorlage extrahiert.
   ================================================================== */

:root {
  /* Marke / Grün */
  --green:        #00d639;
  --green-600:    #00a82d;
  --green-700:    #00701d;
  --green-soft:   rgba(0, 214, 57, 0.14);
  --green-soft-2: rgba(0, 214, 57, 0.18);
  --green-ring:   rgba(0, 214, 57, 0.35);

  /* Text */
  --ink:      rgba(0, 0, 0, 0.9);
  --ink-2:    #3b362e;
  --muted:    #5c554a;
  --muted-2:  #8a8377;
  --faint:    #b7b1a6;

  /* Flächen */
  --white:    #ffffff;
  --paper:    #f4f1ea;   /* App-Hintergrund (warm) */
  --paper-2:  #eeeae1;
  --dark:     #17140f;   /* nahezu Schwarz für dunkle Sektionen */

  /* Ränder */
  --border:        rgba(23, 20, 15, 0.10);
  --border-strong: rgba(23, 20, 15, 0.16);
  --border-input:  rgba(23, 20, 15, 0.14);

  /* Statusfarben */
  --amber-bg:   rgba(228, 195, 77, 0.25);
  --amber-text: #8a6d00;
  --red:        #c0392b;
  --red-bg:     rgba(192, 57, 43, 0.10);

  /* Radien */
  --r-xs: 6px;
  --r-sm: 9px;
  --r:    12px;
  --r-lg: 16px;
  --r-xl: 18px;
  --r-pill: 100px;

  /* Schatten */
  --shadow-sm:   0 1px 3px rgba(23, 20, 15, 0.06);
  --shadow-card: 0 1px 2px rgba(23, 20, 15, 0.05), 0 6px 20px -12px rgba(23, 20, 15, 0.12);
  --shadow-lg:   0 30px 60px -30px rgba(0, 0, 0, 0.45);
  --shadow-green: 0 10px 24px -12px rgba(0, 214, 57, 0.65);

  /* Fonts */
  --font-display: 'Bricolage Grotesque', 'Instrument Sans', system-ui, sans-serif;
  --font-sans:    'Instrument Sans', system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono:    'JetBrains Mono', ui-monospace, 'SFMono-Regular', Menlo, monospace;

  /* Layout */
  --container: 1200px;
  --container-narrow: 1080px;
}

/* ---------- Reset ---------- */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

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

body {
  font-family: var(--font-sans);
  font-size: 15px;
  line-height: 1.55;
  color: var(--ink);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

img, svg { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }
ul, ol { list-style: none; }
input, textarea, select, button { font-family: inherit; font-size: inherit; color: inherit; }

/* ---------- Typografie ---------- */
h1, h2, h3, h4 { font-family: var(--font-display); font-weight: 700; line-height: 1.1; letter-spacing: -0.02em; color: var(--ink); }
h1 { font-weight: 800; }

.eyebrow {
  font-family: var(--font-mono);
  font-weight: 600;
  font-size: 11px;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  color: var(--green-600);
}

.display {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(2.4rem, 5.2vw, 3.4rem);
  line-height: 1.04;
  letter-spacing: -0.03em;
}

.lead { font-size: 1.075rem; color: var(--muted); line-height: 1.55; }
.text-muted { color: var(--muted); }
.text-faint { color: var(--muted-2); }
.text-green { color: var(--green-600); }

/* ---------- Layout-Helfer ---------- */
.container { width: 100%; max-width: var(--container); margin-inline: auto; padding-inline: 24px; }
.container-narrow { max-width: var(--container-narrow); }
.section { padding-block: 88px; }
.stack > * + * { margin-top: var(--stack, 16px); }
.grid { display: grid; gap: 24px; }
.flex { display: flex; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-sm { gap: 8px; } .gap { gap: 16px; } .gap-lg { gap: 24px; }
.hidden { display: none !important; }
.text-center { text-align: center; }
.mt-2 { margin-top: 8px; } .mt-4 { margin-top: 16px; } .mt-6 { margin-top: 24px; } .mt-8 { margin-top: 32px; }
.w-full { width: 100%; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: 15px;
  line-height: 1;
  padding: 12px 20px;
  border-radius: var(--r);
  border: 1px solid transparent;
  transition: transform .12s ease, box-shadow .18s ease, background-color .18s ease, border-color .18s ease;
  white-space: nowrap;
  user-select: none;
}
.btn:active { transform: translateY(1px); }
.btn:focus-visible { outline: 3px solid var(--green-ring); outline-offset: 2px; }
.btn svg { width: 18px; height: 18px; }

.btn-lg { padding: 15px 26px; font-size: 16px; border-radius: var(--r); }
.btn-sm { padding: 9px 14px; font-size: 13.5px; border-radius: var(--r-sm); }
.btn-block { width: 100%; }

.btn-primary { background: var(--green); color: var(--ink); }
.btn-primary:hover { background: var(--green-600); box-shadow: var(--shadow-green); }

.btn-dark { background: var(--dark); color: #fff; }
.btn-dark:hover { background: #000; }

.btn-white { background: #fff; color: var(--ink); border-color: var(--border-strong); }
.btn-white:hover { border-color: var(--muted-2); background: #fdfdfc; }

.btn-ghost { background: transparent; color: var(--muted); }
.btn-ghost:hover { color: var(--ink); background: rgba(23,20,15,0.05); }

.btn-danger { background: var(--red); color: #fff; }
.btn-danger:hover { background: #a93226; }

.btn[disabled], .btn:disabled { opacity: .55; cursor: not-allowed; }

/* ---------- Cards ---------- */
.card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-card);
}
.card-pad { padding: 24px; }
.card-lg { border-radius: var(--r-xl); }

/* ---------- Badges ---------- */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: 11.5px;
  padding: 4px 10px;
  border-radius: var(--r-pill);
  line-height: 1.2;
}
.badge-draft   { background: var(--amber-bg); color: var(--amber-text); }
.badge-done    { background: var(--green-soft); color: var(--green-700); }
.badge-shared  { background: var(--green-soft); color: var(--green-700); }
.badge-neutral { background: rgba(23,20,15,0.08); color: var(--muted); }

/* ---------- Formulare ---------- */
.field { display: block; margin-bottom: 18px; }
.label {
  display: block;
  font-weight: 600;
  font-size: 13px;
  color: var(--ink);
  margin-bottom: 7px;
}
.input, .textarea, .select {
  width: 100%;
  background: #fff;
  border: 1px solid var(--border-input);
  border-radius: 11px;
  padding: 12px 14px;
  font-size: 15px;
  color: var(--ink);
  transition: border-color .15s ease, box-shadow .15s ease;
  appearance: none;
}
.input::placeholder, .textarea::placeholder { color: var(--faint); }
.input:focus, .textarea:focus, .select:focus {
  outline: none;
  border-color: var(--green);
  box-shadow: 0 0 0 3px var(--green-ring);
}
.textarea { min-height: 130px; resize: vertical; line-height: 1.5; }
.select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%235c554a' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 40px;
}
.field-error .input, .field-error .textarea, .field-error .select { border-color: var(--red); }
.error-text { color: var(--red); font-size: 13px; margin-top: 6px; }
.hint { color: var(--muted-2); font-size: 13px; margin-top: 6px; }

.checkbox-row { display: flex; align-items: flex-start; gap: 10px; font-size: 14px; color: var(--muted); }
.checkbox-row input[type=checkbox] { width: 18px; height: 18px; margin-top: 2px; accent-color: var(--green); flex: none; }

/* Honeypot – für Menschen unsichtbar */
.hp-field { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; overflow: hidden; }

/* ---------- Flash-Meldungen ---------- */
.alert { border-radius: var(--r); padding: 14px 16px; font-size: 14px; margin-bottom: 20px; border: 1px solid transparent; }
.alert-success { background: var(--green-soft); color: var(--green-700); border-color: rgba(0,168,45,0.25); }
.alert-error   { background: var(--red-bg); color: var(--red); border-color: rgba(192,57,43,0.25); }
.alert-info    { background: rgba(23,20,15,0.05); color: var(--muted); border-color: var(--border); }

/* ---------- Logo ---------- */
.logo { display: inline-flex; align-items: center; gap: 10px; font-family: var(--font-display); font-weight: 700; font-size: 17px; color: var(--ink); letter-spacing: -0.01em; }
.logo-mark {
  width: 34px; height: 34px; border-radius: var(--r-sm);
  background: var(--green); color: var(--ink);
  display: inline-flex; align-items: center; justify-content: center;
  font-family: var(--font-display); font-weight: 800; font-size: 18px;
}
.logo .tld { color: var(--green-600); }

/* ---------- Utilities ---------- */
.divider { height: 1px; background: var(--border); border: 0; }
.skip-link { position: absolute; left: -999px; top: 0; background: var(--ink); color: #fff; padding: 10px 16px; border-radius: 8px; z-index: 200; }
.skip-link:focus { left: 12px; top: 12px; }
:focus-visible { outline: 3px solid var(--green-ring); outline-offset: 2px; }

@media (max-width: 720px) {
  .section { padding-block: 56px; }
  .container { padding-inline: 18px; }
}

/* ---------- Fehlerseiten ---------- */
.error-page { min-height: 100vh; display: flex; flex-direction: column; }
.error-top { padding-block: 24px; }
.error-box { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 20px 20px 80px; max-width: 640px; margin-inline: auto; }
.error-mock { position: relative; width: 240px; background: #fff; border: 1px solid var(--border); border-radius: var(--r-lg); box-shadow: var(--shadow-card); padding: 18px; margin-bottom: 36px; transform: rotate(-2deg); }
.error-mock-badge { position: absolute; right: -18px; bottom: -14px; background: var(--dark); color: #fff; font-family: var(--font-mono); font-size: 12px; padding: 8px 12px; border-radius: 9px; transform: rotate(4deg); }
.error-code { position: relative; font-family: var(--font-display); font-weight: 800; font-size: clamp(4rem, 12vw, 7rem); line-height: 1; color: var(--green); letter-spacing: -0.04em; }
.error-code::before { content: ""; position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); width: 460px; height: 320px; max-width: 90vw; background: radial-gradient(ellipse at center, rgba(0,214,57,0.20), rgba(0,214,57,0) 70%); z-index: -1; pointer-events: none; }
.error-box h1 { font-size: clamp(1.6rem, 4vw, 2.2rem); margin-top: 8px; }
.error-box p { color: var(--muted); margin-top: 14px; max-width: 42ch; }
.error-actions { display: flex; gap: 12px; margin-top: 30px; flex-wrap: wrap; justify-content: center; }
.error-links { font-size: 14px; color: var(--muted); margin-top: 22px; }
.error-links a { color: var(--green-600); font-weight: 600; }
.error-box code { font-family: var(--font-mono); background: rgba(23,20,15,0.06); padding: 2px 6px; border-radius: 5px; font-size: 13px; }
