/* ============ AREVOS Look – weiß, gold, dezentes Blau ============ */
:root {
  /* Goldtöne abgeleitet vom AREVOS-Logo (#C5AA72) */
  --gold: #ab8f52;
  --gold-dark: #8f763b;
  --gold-deep: #77622f;
  --gold-light: #c5aa72;
  --gold-faint: #ebe2cd;
  --gold-pale: #faf7ef;
  --blue: #2c4a6e;          /* nur dezent, nie als Fläche */
  --ink: #33302a;
  --muted: #8d857a;
  --line: #e9e2d2;
  --error: #b3462e;
  /* Überschriften-Schrift: Cooper Hewitt (Logo-Schrift), Variable heißt historisch --serif */
  --serif: "Cooper Hewitt", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

/* Cooper Hewitt – offizielle Logo-Schrift (SIL OFL, selbst gehostet) */
@font-face {
  font-family: "Cooper Hewitt";
  src: url("../assets/fonts/CooperHewitt-Bold.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Cooper Hewitt";
  src: url("../assets/fonts/CooperHewitt-Semibold.woff2") format("woff2");
  font-weight: 400 600;
  font-style: normal;
  font-display: swap;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: #ffffff;
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.55;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ---------- Header ---------- */
.site-header {
  border-bottom: 1px solid var(--gold-faint);
  background: #fff;
  position: sticky;
  top: 0;
  z-index: 20;
}
.header-inner {
  max-width: 980px;
  margin: 0 auto;
  padding: 18px 24px;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
}
.brand { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.brand-logo { height: 40px; width: auto; display: block; }
.brand-mark {
  font-family: "Cooper Hewitt", var(--sans);
  font-size: 26px;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--ink); /* schwarz wie im offiziellen Logo-Lockup */
}
.brand-sub { align-self: center; }
.brand-sub {
  font-size: 13px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}
.header-note {
  font-size: 12.5px;
  color: var(--blue);
  letter-spacing: 0.04em;
  white-space: nowrap;
}

/* ---------- Layout ---------- */
.page {
  flex: 1;
  width: 100%;
  max-width: 980px;
  margin: 0 auto;
  padding: 28px 24px 60px;
}
.site-footer {
  border-top: 1px solid var(--gold-faint);
  padding: 20px 24px 28px;
  text-align: center;
  font-size: 12.5px;
  color: var(--muted);
}
.footer-hint { margin-top: 4px; font-size: 11.5px; }
.footer-links { margin-top: 10px; }
.footer-links a { color: var(--gold-dark); text-decoration: none; }
.footer-links a:hover { text-decoration: underline; }
.legal-page h3.section-heading { margin-top: 26px; }
.legal-page p { font-size: 14.5px; }

/* ---------- Progress ---------- */
.progress-wrap { margin-bottom: 26px; }
.progress-meta {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 8px;
}
.progress-step {
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--blue);
}
.progress-label {
  font-family: var(--serif);
  font-size: 15px;
  color: var(--gold-dark);
}
.progress-track {
  height: 4px;
  background: var(--gold-faint);
  border-radius: 2px;
  overflow: hidden;
}
.progress-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--gold-light), var(--gold));
  border-radius: 2px;
  transition: width 0.45s ease;
}

/* ---------- Cards & Steps ---------- */
.card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 34px 38px;
  box-shadow: 0 10px 34px rgba(140, 115, 55, 0.07);
}
.card + .card { margin-top: 22px; }

.welcome-logo {
  display: block;
  width: 120px;
  height: auto;
  margin: 4px auto 22px;
}
.welcome-center { text-align: center; }
p.welcome-center { max-width: 640px; margin-left: auto; margin-right: auto; }
.step-title {
  font-family: var(--serif);
  font-size: 30px;
  font-weight: 600;
  color: var(--gold);
  margin: 0 0 6px;
  letter-spacing: 0.01em;
}
.step-sub {
  color: var(--muted);
  font-size: 15px;
  margin: 0 0 26px;
}
.section-heading {
  font-family: var(--serif);
  font-size: 19px;
  color: var(--gold-dark);
  border-bottom: 1px solid var(--gold-faint);
  padding-bottom: 8px;
  margin: 30px 0 18px;
}
.section-heading:first-of-type { margin-top: 4px; }

/* ---------- Form Grid ---------- */
.grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px 22px;
}
.grid .full { grid-column: 1 / -1; }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 16px 22px; }

.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field label {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--ink);
}
.field label .opt {
  font-weight: 400;
  color: var(--muted);
  font-size: 12px;
}
.field input[type="text"],
.field input[type="email"],
.field input[type="tel"],
.field input[type="date"],
.field input[type="number"],
.field select,
.field textarea {
  appearance: none;
  -webkit-appearance: none;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 11px 13px;
  font-size: 15.5px;
  font-family: var(--sans);
  color: var(--ink);
  background: #fff;
  transition: border-color 0.15s, box-shadow 0.15s;
  width: 100%;
}
.field select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23b4903e' stroke-width='1.8' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 36px;
}
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none;
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(180, 144, 62, 0.16);
}
.field input.invalid, .field select.invalid, .field textarea.invalid {
  border-color: var(--error);
  box-shadow: 0 0 0 3px rgba(179, 70, 46, 0.12);
}
.field .hint { font-size: 12px; color: var(--muted); }
textarea { resize: vertical; min-height: 80px; }

input[type="checkbox"], input[type="radio"] { accent-color: var(--gold); width: 18px; height: 18px; }

.check-row {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14.5px;
  cursor: pointer;
}

/* Radio-Karten (Start) */
.choice-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin-top: 10px; }
.choice-card {
  border: 1.5px solid var(--line);
  border-radius: 14px;
  padding: 24px 22px;
  cursor: pointer;
  text-align: center;
  transition: border-color 0.15s, box-shadow 0.15s, transform 0.1s;
  background: #fff;
}
.choice-card:hover { border-color: var(--gold-light); }
.choice-card.selected {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(180, 144, 62, 0.15);
  background: var(--gold-pale);
}
.choice-card .ico { font-size: 30px; color: var(--gold); font-family: var(--serif); }
.choice-card h3 { margin: 10px 0 6px; font-size: 17px; color: var(--ink); }
.choice-card p { margin: 0; font-size: 13.5px; color: var(--muted); }

/* Startseite: Aaron als transparenter Hintergrund */
.card { position: relative; }
.hero-bg-wrap {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  overflow: hidden;
  z-index: 0;
  pointer-events: none;
}
.hero-bg-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 20%;
  opacity: 0.2; /* helleres Bild braucht etwas mehr Deckkraft */
}
.hero-bg-wrap::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(255,255,255,0) 30%, rgba(255,255,255,0.92) 88%);
}
.hero-content { position: relative; z-index: 1; }

/* Ansprechpartner (Aaron) */
.advisor-inline {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 14px 0 18px;
  font-size: 13.5px;
  color: var(--muted);
}
.advisor-inline.center { justify-content: center; margin: 20px auto 4px; max-width: 460px; text-align: left; }
.avatar {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--gold-light);
  flex-shrink: 0;
}
/* Segment ja/nein */
.segment { display: inline-flex; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.segment button {
  border: none;
  background: #fff;
  padding: 10px 22px;
  font-size: 14.5px;
  color: var(--muted);
  cursor: pointer;
  font-family: var(--sans);
}
.segment button + button { border-left: 1px solid var(--line); }
.segment button.active { background: var(--gold); color: #fff; font-weight: 600; }

/* ---------- Money table ---------- */
.money-table { width: 100%; border-collapse: collapse; }
.money-table th {
  text-align: left;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--blue);
  font-weight: 600;
  padding: 8px 8px 8px 0;
  border-bottom: 1px solid var(--gold-faint);
}
.money-table th.num, .money-table td.num { text-align: right; }
.money-table td {
  padding: 7px 8px 7px 0;
  border-bottom: 1px solid #f3efe4;
  font-size: 14.5px;
  vertical-align: middle;
}
.money-table td.rowlabel { width: 38%; color: var(--ink); }
.money-table input {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px 10px;
  font-size: 14.5px;
  text-align: right;
  font-variant-numeric: tabular-nums;
}
.money-table input:focus { outline: none; border-color: var(--gold); box-shadow: 0 0 0 3px rgba(180,144,62,0.14); }
.money-table tr.sum-row td {
  font-weight: 700;
  color: var(--gold-dark);
  border-top: 2px solid var(--gold-light);
  border-bottom: none;
  padding-top: 12px;
  font-variant-numeric: tabular-nums;
}
.money-table tr.free-row td { font-weight: 700; color: var(--blue); border-bottom: none; font-variant-numeric: tabular-nums; }

/* ---------- Repeat blocks ---------- */
.repeat-block {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 20px 22px;
  margin-bottom: 16px;
  position: relative;
  background: #fffdf8;
}
.repeat-block .block-nr {
  position: absolute;
  top: -11px;
  left: 18px;
  background: var(--gold);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  border-radius: 20px;
  padding: 2px 12px;
  letter-spacing: 0.06em;
}
.repeat-block .block-remove {
  position: absolute;
  top: 10px;
  right: 12px;
  border: none;
  background: none;
  color: var(--muted);
  font-size: 20px;
  cursor: pointer;
  line-height: 1;
  padding: 4px 8px;
}
.repeat-block .block-remove:hover { color: var(--error); }

.btn-add {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1.5px dashed var(--gold-light);
  color: var(--gold-dark);
  background: #fff;
  border-radius: 10px;
  padding: 10px 18px;
  font-size: 14.5px;
  cursor: pointer;
  font-family: var(--sans);
}
.btn-add:hover { background: var(--gold-pale); }

/* ---------- Buttons ---------- */
.nav-buttons {
  max-width: 980px;
  margin: 26px auto 0;
  display: flex;
  justify-content: space-between;
  gap: 14px;
}
.btn {
  border: none;
  border-radius: 999px;
  padding: 13px 34px;
  font-size: 15.5px;
  font-weight: 600;
  cursor: pointer;
  font-family: var(--sans);
  letter-spacing: 0.02em;
  transition: transform 0.08s, box-shadow 0.15s, background 0.15s;
}
.btn:active { transform: translateY(1px); }
.btn-primary {
  background: linear-gradient(135deg, var(--gold-light) 0%, var(--gold-dark) 100%);
  color: #fff;
  box-shadow: 0 6px 18px rgba(143, 118, 59, 0.28);
}
.btn-primary:hover { box-shadow: 0 8px 22px rgba(143, 118, 59, 0.38); }
.btn-primary:disabled {
  background: #d9d2c2;
  box-shadow: none;
  cursor: not-allowed;
}
.btn-secondary {
  background: #fff;
  color: var(--gold-dark);
  border: 1.5px solid var(--gold-light);
}
.btn-secondary:hover { background: var(--gold-pale); }
.btn-large { padding: 16px 44px; font-size: 17px; }

/* ---------- Errors ---------- */
.error-box {
  border: 1px solid rgba(179, 70, 46, 0.4);
  background: #fdf3f0;
  color: var(--error);
  border-radius: 10px;
  padding: 12px 16px;
  font-size: 14px;
  margin-bottom: 18px;
}
.error-box ul { margin: 4px 0 0; padding-left: 20px; }

/* ---------- PDF Preview & Signature ---------- */
.pdf-preview {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #f6f4ee;
  max-height: 58vh;
  overflow-y: auto;
  padding: 18px;
  text-align: center;
}
.pdf-preview canvas {
  display: block;
  margin: 0 auto 16px;
  box-shadow: 0 3px 14px rgba(0,0,0,0.13);
  background: #fff;
  max-width: 100%;
  height: auto;
}
.preview-hint {
  text-align: center;
  font-size: 12.5px;
  color: var(--blue);
  margin: 10px 0 0;
}

.sign-card { margin-top: 22px; }
.sign-title {
  font-family: var(--serif);
  font-size: 22px;
  color: var(--gold);
  margin: 0 0 4px;
}
.sig-pads { display: grid; grid-template-columns: 1fr; gap: 20px; margin: 18px 0; }
.sig-pads.two { grid-template-columns: 1fr 1fr; }
.sig-box label {
  font-size: 13px;
  font-weight: 600;
  display: block;
  margin-bottom: 6px;
}
.sig-canvas-wrap {
  position: relative;
  border: 1.5px solid var(--gold-light);
  border-radius: 12px;
  background: #fffdf6;
  overflow: hidden;
}
.sig-canvas-wrap canvas {
  display: block;
  width: 100%;
  height: 160px;
  touch-action: none;
  cursor: crosshair;
}
.sig-line {
  position: absolute;
  left: 8%;
  right: 8%;
  bottom: 34px;
  border-bottom: 1px dashed var(--gold-light);
  pointer-events: none;
}
.sig-x {
  position: absolute;
  left: 8%;
  bottom: 38px;
  color: var(--gold-light);
  font-size: 18px;
  font-family: var(--serif);
  pointer-events: none;
}
.sig-clear {
  position: absolute;
  top: 8px;
  right: 10px;
  border: none;
  background: rgba(255,255,255,0.85);
  color: var(--muted);
  font-size: 12.5px;
  cursor: pointer;
  border-radius: 8px;
  padding: 4px 10px;
}
.sig-clear:hover { color: var(--error); }

.consent-row {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  background: var(--gold-pale);
  border: 1px solid var(--gold-faint);
  border-radius: 12px;
  padding: 16px 18px;
  margin: 20px 0;
  font-size: 14px;
  line-height: 1.5;
  cursor: pointer;
}
.consent-row input { margin-top: 2px; flex-shrink: 0; }

.sign-actions { display: flex; justify-content: center; margin-top: 8px; }
.finish-hint {
  text-align: center;
  font-size: 12.5px;
  color: var(--muted);
  margin: 12px auto 0;
  max-width: 420px;
}

/* ---------- Success ---------- */
.success-wrap { text-align: center; padding: 30px 10px; }
.success-icon {
  width: 76px; height: 76px;
  border: 2.5px solid var(--gold);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 22px;
  font-size: 34px;
  color: var(--gold);
}
.success-wrap h2 { font-family: var(--serif); color: var(--gold); font-size: 28px; margin: 0 0 10px; }
.success-wrap p { color: var(--muted); max-width: 520px; margin: 0 auto 8px; }
.success-actions { display: flex; gap: 14px; justify-content: center; margin-top: 26px; flex-wrap: wrap; }

/* ---------- Loading ---------- */
.loading-wrap { text-align: center; padding: 50px 0; color: var(--muted); }
.spinner {
  width: 44px; height: 44px;
  border: 3px solid var(--gold-faint);
  border-top-color: var(--gold);
  border-radius: 50%;
  margin: 0 auto 18px;
  animation: spin 0.9s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- Info note (dezentes Blau) ---------- */
.info-note {
  border-left: 3px solid var(--blue);
  padding: 10px 16px;
  font-size: 13.5px;
  color: var(--blue);
  background: #fff;
  margin: 16px 0;
}

/* ---------- Responsive ---------- */
.mobile-only { display: none; }
@media (max-width: 720px) {
  .mobile-only { display: block; margin: 0 0 10px; color: var(--blue); font-size: 12.5px; }
  .card { padding: 24px 20px; border-radius: 12px; }
  .grid, .grid-3 { grid-template-columns: 1fr; }
  .choice-cards { grid-template-columns: 1fr; }
  .sig-pads.two { grid-template-columns: 1fr; }
  .step-title { font-size: 24px; }
  .header-note { display: none; }
  .money-table td.rowlabel { width: 30%; font-size: 13px; }
  .money-table input { padding: 7px 6px; font-size: 13.5px; }
}
