/* ==========================================================================
   innoverplus Widerrufsfunnel – Stylesheet
   CI: #005F73 Teal + #ECA524 Orange (exakte innoverplus-Markenfarben)
   Design: angelehnt an zahnreinigungflatrate.de/widerruf
   v3
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. CSS Custom Properties – exakte innoverplus CI
   -------------------------------------------------------------------------- */
:root {
  /* ── innoverplus Primärfarben (aus Logo) ── */
  --color-teal:           #005F73;   /* Haupt-Teal – "innoverplus" Schriftfarbe */
  --color-teal-dark:      #004d5e;   /* Hover / Dunkel */
  --color-teal-mid:       #006d84;   /* Leicht heller Teal */
  --color-teal-light:     #e0f2f6;   /* Heller Teal-Hintergrund */
  --color-teal-xlight:    #f0f9fb;   /* Sehr heller Teal */

  --color-orange:         #ECA524;   /* Akzent-Orange – "innovativ versichert" */
  --color-orange-dark:    #d4921e;   /* Hover */
  --color-orange-light:   #fdf6e3;   /* Heller Orange-Hintergrund */

  /* ── Header / Footer ── */
  --color-header-bg:      #003d4d;   /* Etwas dunkler als Teal für Header */
  --color-header-border:  rgba(0,95,115,.35);

  /* ── Widerruf-Erklärungsbox (beige/creme wie Referenz, aber in Teal-Tone) ── */
  --color-decl-bg:        #f0f9fb;
  --color-decl-border:    #8ec5cf;
  --color-decl-text:      #004455;
  --color-decl-title:     #005F73;
  --color-decl-icon:      #005F73;

  /* ── Allgemein ── */
  --color-card-bg:        #ffffff;
  --color-card-border:    #e2eaec;
  --color-bg:             #f0f4f5;   /* Leicht teal-getöntes Grau */
  --color-text:           #1a2e33;   /* Sehr dunkles Teal-Schwarz */
  --color-text-muted:     #5a7a82;
  --color-text-light:     #8fadb5;
  --color-label:          #2d5561;

  --color-input-border:   #bdd0d5;
  --color-input-focus:    #005F73;

  --color-success:        #16a34a;
  --color-success-bg:     #f0fdf4;
  --color-error:          #dc2626;
  --color-error-bg:       #fef2f2;

  /* ── Radius ── */
  --radius-sm:   6px;
  --radius-md:   10px;
  --radius-lg:   16px;
  --radius-xl:   20px;
  --radius-full: 9999px;

  /* ── Shadows ── */
  --shadow-card: 0 1px 4px rgba(0,63,77,.07), 0 4px 16px rgba(0,63,77,.08);
  --shadow-btn:  0 4px 14px rgba(0,95,115,.35);
  --shadow-btn-orange: 0 4px 14px rgba(236,165,36,.4);

  /* ── Fonts ── */
  --font-body:    'Inter', 'Segoe UI', sans-serif;
  --font-heading: 'Poppins', 'Inter', sans-serif;

  --transition: .2s ease;
}

/* --------------------------------------------------------------------------
   2. Reset & Base
   -------------------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.6;
  color: var(--color-text);
  background: var(--color-bg);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

a { color: var(--color-teal); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--color-teal-dark); }
strong { font-weight: 600; }
ul { list-style: none; }
img, svg { display: block; max-width: 100%; }

/* --------------------------------------------------------------------------
   3. Utility
   -------------------------------------------------------------------------- */
.container {
  width: 100%;
  max-width: 680px;
  margin-inline: auto;
  padding-inline: 16px;
}

.hidden { display: none !important; }

/* --------------------------------------------------------------------------
   4. Header – innoverplus CI (Teal-Dunkel)
   -------------------------------------------------------------------------- */
.site-header {
  background: var(--color-header-bg);
  border-bottom: 1px solid var(--color-header-border);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 12px rgba(0,0,0,.18);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
  max-width: 1100px;
  margin-inline: auto;
  padding-inline: 24px;
}

/* Logo als Bild */
.header-logo {
  display: flex;
  align-items: center;
  text-decoration: none;
  transition: opacity var(--transition);
  flex-shrink: 0;
}
.header-logo:hover { opacity: .88; }

.header-logo img {
  height: 46px;
  width: auto;
  display: block;
  /* Weißt das SVG für dunklen Header-Hintergrund */
  filter: brightness(0) invert(1);
}

/* Fallback Text-Logo falls Bild fehlt */
.logo-fallback {
  font-family: var(--font-heading);
  font-size: 1.3rem;
  font-weight: 700;
  color: #ffffff;
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}
.logo-fallback .logo-sub {
  font-size: .62rem;
  font-weight: 400;
  letter-spacing: .18em;
  color: var(--color-orange);
  text-transform: lowercase;
  margin-top: 2px;
}

/* --------------------------------------------------------------------------
   5. Hero Band
   -------------------------------------------------------------------------- */
.hero-band {
  background: #ffffff;
  border-bottom: 1px solid #dce8eb;
  padding: 30px 16px 26px;
  text-align: center;
}

.hero-eyebrow {
  font-size: .7rem;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--color-orange);
  margin-bottom: 8px;
}

.hero-title {
  font-family: var(--font-heading);
  font-size: clamp(1.4rem, 3.5vw, 1.85rem);
  font-weight: 700;
  color: var(--color-teal);
  margin-bottom: 10px;
  letter-spacing: -.02em;
}

.hero-subtitle {
  font-size: .88rem;
  color: var(--color-text-muted);
  max-width: 460px;
  margin-inline: auto;
  line-height: 1.65;
}

/* --------------------------------------------------------------------------
   6. Main
   -------------------------------------------------------------------------- */
.main-content {
  flex: 1;
  padding-block: 30px;
}

/* --------------------------------------------------------------------------
   7. Progress Steps
   -------------------------------------------------------------------------- */
.progress-wrapper { margin-bottom: 22px; }

.progress-steps {
  display: flex;
  align-items: center;
  justify-content: center;
  list-style: none;
}

.step {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  min-width: 80px;
}

.step-circle {
  width: 38px;
  height: 38px;
  border-radius: var(--radius-full);
  background: #dce8eb;
  border: 2px solid #dce8eb;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: .88rem;
  color: #8fadb5;
  transition: all var(--transition);
}

.step-num   { display: block; }
.step-check { display: none; }

.step-label {
  font-size: .72rem;
  font-weight: 600;
  color: #8fadb5;
  letter-spacing: .02em;
  transition: color var(--transition);
  white-space: nowrap;
}

.step.active .step-circle {
  background: var(--color-teal);
  border-color: var(--color-teal);
  color: #fff;
  box-shadow: 0 0 0 4px rgba(0,95,115,.18);
}
.step.active .step-label { color: var(--color-teal); }

.step.completed .step-circle {
  background: var(--color-success);
  border-color: var(--color-success);
  color: #fff;
}
.step.completed .step-num   { display: none; }
.step.completed .step-check { display: block; }
.step.completed .step-label { color: var(--color-success); }

.step-connector {
  flex: 1;
  height: 2px;
  background: #dce8eb;
  margin-bottom: 22px;
  max-width: 70px;
  transition: background var(--transition);
}
.step-connector.active { background: var(--color-teal); }

/* --------------------------------------------------------------------------
   8. Funnel Card
   -------------------------------------------------------------------------- */
.funnel-card {
  background: var(--color-card-bg);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-card);
  border: 1px solid var(--color-card-border);
  overflow: hidden;
  animation: cardIn .3s ease forwards;
}

@keyframes cardIn {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* --------------------------------------------------------------------------
   9. Card Header
   -------------------------------------------------------------------------- */
.card-header {
  padding: 22px 28px 18px;
  border-bottom: 1px solid #edf2f4;
  position: relative;
}
.card-header::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--color-teal), var(--color-teal-mid));
}

.card-step-badge {
  display: inline-block;
  font-size: .68rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--color-text-muted);
  background: #edf2f4;
  border-radius: var(--radius-full);
  padding: 3px 10px;
  margin-bottom: 8px;
}

.card-header h2 {
  font-family: var(--font-heading);
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--color-teal);
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.card-header h2 i { color: var(--color-orange); font-size: .95rem; }

.card-desc {
  font-size: .85rem;
  color: var(--color-text-muted);
  line-height: 1.6;
}

/* --------------------------------------------------------------------------
   10. Form
   -------------------------------------------------------------------------- */
.funnel-card form:not(#widerruf-form) {
  padding: 22px 28px 26px;
}

.form-row { margin-bottom: 16px; }

.form-row.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.field-group { display: flex; flex-direction: column; gap: 5px; }

label {
  font-size: .8rem;
  font-weight: 600;
  color: var(--color-label);
}

.req { color: var(--color-error); margin-left: 2px; }

.input-wrap { position: relative; }

.input-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: #bdd0d5;
  font-size: .83rem;
  pointer-events: none;
  transition: color var(--transition);
}
.input-wrap:focus-within .input-icon { color: var(--color-teal); }

input[type="text"],
input[type="email"],
input[type="date"] {
  width: 100%;
  height: 44px;
  padding: 0 12px 0 38px;
  font-family: var(--font-body);
  font-size: .9rem;
  color: var(--color-text);
  background: #fff;
  border: 1.5px solid var(--color-input-border);
  border-radius: var(--radius-md);
  outline: none;
  transition: border-color var(--transition), box-shadow var(--transition);
  appearance: none;
  -webkit-appearance: none;
}
input[type="text"]:focus,
input[type="email"]:focus,
input[type="date"]:focus {
  border-color: var(--color-input-focus);
  box-shadow: 0 0 0 3px rgba(0,95,115,.12);
}
input.is-valid   { border-color: #16a34a; }
input.is-invalid {
  border-color: var(--color-error);
  background: var(--color-error-bg);
  box-shadow: 0 0 0 3px rgba(220,38,38,.07);
}

.field-error {
  font-size: .74rem;
  color: var(--color-error);
  font-weight: 500;
  min-height: 16px;
  display: flex;
  align-items: center;
  gap: 4px;
}
.field-error:not(:empty)::before {
  content: '\f071';
  font-family: 'Font Awesome 6 Free';
  font-weight: 900;
  font-size: .66rem;
}

input[type="date"]::-webkit-calendar-picker-indicator {
  opacity: .4;
  cursor: pointer;
}

.hidden-field {
  position: absolute;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  pointer-events: none;
}

/* --------------------------------------------------------------------------
   11. Buttons
   -------------------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--font-heading);
  font-size: .95rem;
  font-weight: 700;
  border: 2px solid transparent;
  border-radius: var(--radius-full);
  cursor: pointer;
  padding: 0 28px;
  height: 50px;
  transition: all var(--transition);
  text-decoration: none;
  white-space: nowrap;
  user-select: none;
}
.btn:disabled { opacity: .6; cursor: not-allowed; }

/* Primary – großer oranger Pill-Button (Referenz-Stil) */
.btn-primary {
  background: var(--color-orange);
  color: #fff;
  border-color: var(--color-orange);
  box-shadow: var(--shadow-btn-orange);
  width: 100%;
  height: 54px;
  font-size: 1rem;
}
.btn-primary:hover:not(:disabled) {
  background: var(--color-orange-dark);
  border-color: var(--color-orange-dark);
  color: #fff;
  box-shadow: 0 6px 18px rgba(236,165,36,.5);
  transform: translateY(-1px);
}
.btn-primary:active:not(:disabled) { transform: translateY(0); }

/* Outline */
.btn-outline {
  background: transparent;
  color: var(--color-teal);
  border-color: var(--color-input-border);
  height: 42px;
  font-size: .86rem;
  padding: 0 18px;
  border-radius: var(--radius-md);
  font-weight: 600;
}
.btn-outline:hover:not(:disabled) {
  border-color: var(--color-teal);
  background: var(--color-teal-xlight);
  color: var(--color-teal-dark);
}

.btn-sm {
  height: 32px;
  font-size: .76rem;
  padding: 0 12px;
  border-radius: var(--radius-sm);
}

.btn-spinner { font-size: .88rem; }

.form-actions { margin-top: 22px; }

.step2-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 22px 28px 0;
}

.form-hint {
  padding: 10px 28px 22px;
  font-size: .74rem;
  color: var(--color-text-light);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
}

/* --------------------------------------------------------------------------
   12. Summary Box
   -------------------------------------------------------------------------- */
.summary-box { padding: 0 28px; margin-top: 4px; }

.summary-title {
  font-family: var(--font-heading);
  font-size: .88rem;
  font-weight: 700;
  color: var(--color-teal);
  padding: 14px 0 10px;
  border-bottom: 1px solid #edf2f4;
  margin-bottom: 0;
  display: flex;
  align-items: center;
  gap: 7px;
}
.summary-title i { color: var(--color-orange); }

.summary-list {
  display: flex;
  flex-direction: column;
  border-bottom: 1px solid #edf2f4;
  margin-bottom: 14px;
}

.summary-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 11px 0;
  border-bottom: 1px solid #f5f9fa;
}
.summary-row:last-child { border-bottom: none; }

.summary-row dt {
  font-size: .81rem;
  font-weight: 500;
  color: var(--color-text-muted);
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
  min-width: 155px;
}
.summary-row dt i { color: var(--color-text-light); width: 14px; text-align: center; font-size: .76rem; }

.summary-row dd {
  font-size: .86rem;
  font-weight: 600;
  color: var(--color-text);
  text-align: right;
  word-break: break-word;
}

/* --------------------------------------------------------------------------
   13. Widerrufserklärung Box – teal-getönt (wie Referenz, aber innoverplus CI)
   -------------------------------------------------------------------------- */
.declaration-box {
  margin: 0 28px 8px;
  background: var(--color-decl-bg);
  border: 1.5px solid var(--color-decl-border);
  border-radius: var(--radius-md);
  padding: 16px 18px 14px;
}

.declaration-icon-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
}
.declaration-icon-row i { color: var(--color-decl-icon); font-size: 1rem; }

.declaration-title {
  font-size: .88rem;
  font-weight: 700;
  color: var(--color-decl-title);
  font-family: var(--font-heading);
}

.declaration-text {
  font-size: .86rem;
  color: var(--color-decl-text);
  line-height: 1.75;
  font-style: normal;
  border: none;
  padding: 0;
  margin: 0;
}

.declaration-meta {
  margin-top: 10px;
  font-size: .72rem;
  color: var(--color-text-light);
  display: flex;
  align-items: center;
  gap: 5px;
}
.declaration-meta strong { color: var(--color-text-muted); }
.declaration-meta i { color: var(--color-teal); font-size: .7rem; }

.edit-btn-row { padding: 0 28px 14px; }

/* --------------------------------------------------------------------------
   14. Formspree Feedback
   -------------------------------------------------------------------------- */
.fs-feedback {
  margin: 0 28px 4px;
  padding: 11px 15px;
  border-radius: var(--radius-md);
  font-weight: 600;
  font-size: .84rem;
  display: flex;
  align-items: center;
  gap: 7px;
}
.fs-success { background: var(--color-success-bg); color: var(--color-success); border: 1px solid #bbf7d0; }
.fs-error   { background: var(--color-error-bg);   color: var(--color-error);   border: 1px solid #fecaca; }

/* --------------------------------------------------------------------------
   15. Success Card
   -------------------------------------------------------------------------- */
.success-card { text-align: center; padding: 48px 28px 40px; }

.success-icon {
  font-size: 4.5rem;
  color: var(--color-success);
  margin-bottom: 18px;
  animation: popIn .45s cubic-bezier(.34,1.56,.64,1) forwards;
}
@keyframes popIn {
  from { transform: scale(0); opacity: 0; }
  to   { transform: scale(1); opacity: 1; }
}

.success-card h2 {
  font-family: var(--font-heading);
  font-size: 1.45rem;
  font-weight: 700;
  color: var(--color-teal);
  margin-bottom: 12px;
  line-height: 1.3;
}

.success-text {
  font-size: .88rem;
  color: var(--color-text-muted);
  line-height: 1.75;
  margin-bottom: 26px;
  max-width: 420px;
  margin-inline: auto;
}
.success-text strong { color: var(--color-text); }

.success-info-box {
  background: var(--color-teal-xlight);
  border: 1px solid #b3d8e0;
  border-radius: var(--radius-lg);
  padding: 18px 20px;
  text-align: left;
  margin-bottom: 22px;
}
.success-info-box h3 {
  font-family: var(--font-heading);
  font-size: .86rem;
  font-weight: 700;
  color: var(--color-teal);
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.success-info-box h3 i { color: var(--color-teal); }
.success-info-box ul { display: flex; flex-direction: column; gap: 8px; }
.success-info-box li {
  font-size: .83rem;
  color: var(--color-text);
  display: flex;
  align-items: flex-start;
  gap: 8px;
}
.success-info-box li i { color: var(--color-teal); margin-top: 2px; width: 14px; flex-shrink: 0; }

.success-ref {
  background: #edf2f4;
  border: 1px solid #d0dfe3;
  border-radius: var(--radius-md);
  padding: 9px 16px;
  margin-bottom: 22px;
  font-size: .79rem;
  color: var(--color-text-muted);
  display: inline-block;
}
.success-ref strong { color: var(--color-teal); }

.success-card .btn-primary { max-width: 320px; margin-inline: auto; }

/* --------------------------------------------------------------------------
   16. Footer
   -------------------------------------------------------------------------- */
.site-footer {
  background: var(--color-header-bg);
  border-top: 1px solid rgba(255,255,255,.07);
  margin-top: auto;
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 52px;
  max-width: 1100px;
  margin-inline: auto;
  padding-inline: 24px;
  gap: 16px;
}

.footer-nav {
  display: flex;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
}
.footer-nav a {
  font-size: .77rem;
  color: rgba(255,255,255,.48);
  font-weight: 500;
  transition: color var(--transition);
}
.footer-nav a:hover { color: rgba(255,255,255,.82); }

.footer-pill-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: .74rem;
  font-weight: 700;
  color: #fff !important;
  background: var(--color-orange);
  border-radius: var(--radius-full);
  padding: 4px 12px;
  transition: background var(--transition), transform var(--transition);
  box-shadow: 0 2px 8px rgba(236,165,36,.35);
}
.footer-pill-btn:hover {
  background: var(--color-orange-dark);
  transform: translateY(-1px);
  color: #fff !important;
}

.footer-logo {
  display: flex;
  align-items: center;
  text-decoration: none;
  flex-shrink: 0;
  transition: opacity var(--transition);
}
.footer-logo:hover { opacity: .8; }

.footer-logo img {
  height: 28px;
  width: auto;
  filter: brightness(0) invert(1);
}

/* --------------------------------------------------------------------------
   17. Responsive
   -------------------------------------------------------------------------- */
@media (max-width: 600px) {
  .header-inner { padding-inline: 16px; }
  .header-logo img { height: 34px; }

  .hero-band { padding: 20px 16px 18px; }

  .card-header { padding: 16px 16px 14px; }
  .funnel-card form:not(#widerruf-form) { padding: 16px 16px 20px; }
  .form-row.two-col { grid-template-columns: 1fr; gap: 0; }

  .summary-box,
  .edit-btn-row,
  .step2-actions,
  .form-hint    { padding-inline: 16px; }

  .declaration-box,
  .fs-feedback  { margin-inline: 16px; }

  .summary-row  { flex-direction: column; align-items: flex-start; gap: 2px; }
  .summary-row dd { text-align: left; }
  .summary-row dt { min-width: unset; }

  .success-card { padding: 30px 16px 26px; }

  .footer-inner { height: auto; padding-block: 10px; flex-wrap: wrap; justify-content: center; gap: 10px; }
  .footer-nav   { justify-content: center; }
  .footer-logo  { display: none; }

  .step { min-width: 56px; }
  .step-label  { font-size: .63rem; }
  .step-circle { width: 34px; height: 34px; font-size: .8rem; }
  .step-connector { max-width: 34px; }
}

@media (max-width: 360px) {
  .step-label { display: none; }
  .footer-nav { gap: 8px; }
}
