/* ============================================
   PlainRight – /anfrage Funnel Styles
   Premium dark theme, konsistent mit /risikoanalyse
   ============================================ */

/* Font: Inter (self-hosted, see /fonts/fonts.css) */

/* ── Variables ── */
:root {
    --pr-blue-start:  #29ABE2;
    --pr-blue-end:    #0072BC;
    --pr-blue-mid:    #1A8FD1;
    --pr-blue-glow:   rgba(41, 171, 226, 0.35);
    --pr-blue-subtle: rgba(41, 171, 226, 0.08);

    --pr-dark-900: #0A0D14;
    --pr-dark-800: #0D1117;
    --pr-dark-700: #161B22;
    --pr-dark-600: #1C2333;

    --pr-surface:        rgba(22, 27, 34, 0.80);
    --pr-surface-border: rgba(41, 171, 226, 0.12);

    --pr-text:           #F0F4F8;
    --pr-text-secondary: #8B9AB0;
    --pr-text-muted:     #5A6A80;

    --pr-green:      #22C55E;
    --pr-green-glow: rgba(34, 197, 94, 0.2);
    --pr-red:        #EF4444;
    --pr-amber:      #F59E0B;
    --pr-white-10:   rgba(255,255,255,0.10);
    --pr-white-06:   rgba(255,255,255,0.06);

    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 20px;
}

/* ── Icon System ── */
.pr-icon {
    width: 1em;
    height: 1em;
    vertical-align: -0.125em;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
    display: inline-block;
    flex-shrink: 0;
}
.pr-icon-lg {
    width: 1.5em;
    height: 1.5em;
}
.pr-icon-xl {
    width: 2em;
    height: 2em;
}


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

html { scroll-behavior: smooth; }

body {
    font-family: 'Inter', -apple-system, sans-serif;
    background: var(--pr-dark-900);
    color: var(--pr-text);
    min-height: 100vh;
    line-height: 1.6;
}

/* ── Page Wrapper ── */
.page-wrapper {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* ── Header ── */
.funnel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 24px;
    border-bottom: 1px solid var(--pr-surface-border);
    background: var(--pr-dark-800);
    position: sticky;
    top: 0;
    z-index: 100;
}

.logo-link { display: flex; align-items: center; text-decoration: none; }

.logo {
    height: 36px;
    width: auto;
}

.header-trust {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: var(--pr-green);
    font-weight: 500;
}

.trust-dot {
    width: 8px; height: 8px;
    border-radius: 50%;
    background: var(--pr-green);
    box-shadow: 0 0 6px var(--pr-green-glow);
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50%       { opacity: 0.5; }
}

/* ── Progress Bar ── */
.progress-bar-container {
    height: 3px;
    background: var(--pr-white-06);
    width: 100%;
}

.progress-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--pr-blue-start), var(--pr-blue-end));
    transition: width 0.4s ease;
    box-shadow: 0 0 8px var(--pr-blue-glow);
}

/* ── Hero: Beitragsspannen oberhalb des Funnels ──
   Zahlen und Hinweistexte stammen zeichengleich von
   /vermieterrechtsschutz-kosten (ADR-016/ADR-017); hier nur die Darstellung. */
.hero-premium {
    padding: 28px 16px 4px;
}

.hero-premium-inner {
    max-width: 880px;
    margin: 0 auto;
}

.hero-premium-eyebrow {
    display: block;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--pr-blue-start);
    margin-bottom: 6px;
}

.hero-premium-title {
    font-size: clamp(18px, 3vw, 22px);
    font-weight: 700;
    color: var(--pr-text);
    margin-bottom: 16px;
    line-height: 1.3;
}

.hero-price-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
}

.hero-price {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 14px 16px;
    background: var(--pr-white-06);
    border: 1px solid var(--pr-white-10);
    border-radius: var(--radius-md);
}

.hero-price-tier {
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--pr-text-secondary);
}

.hero-price .price-value {
    font-size: 15px;
    font-weight: 700;
    color: var(--pr-text);
    line-height: 1.35;
}

.hero-price .price-hint {
    font-size: 11px;
    color: var(--pr-text-muted);
    line-height: 1.45;
}

.hero-price-note {
    margin-top: 12px;
    font-size: 11px;
    color: var(--pr-text-muted);
    line-height: 1.5;
}

.hero-price-link {
    margin-top: 8px;
    font-size: 13px;
}
.hero-price-link a {
    color: var(--pr-blue-start);
    text-decoration: none;
}
.hero-price-link a:hover { text-decoration: underline; }

/* ── Main ── */
.funnel-main {
    flex: 1;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding: 40px 16px 60px;
}

/* ── Steps ── */
.step {
    width: 100%;
    max-width: 560px;
    display: none;
    animation: fadeInUp 0.35s ease;
}

.step.active { display: block; }

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

/* ── Card ── */
.step-card {
    background: var(--pr-surface);
    border: 1px solid var(--pr-surface-border);
    border-radius: var(--radius-lg);
    padding: 40px;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

.step-eyebrow {
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--pr-blue-start);
    margin-bottom: 12px;
}

.step-title {
    font-size: clamp(22px, 4vw, 30px);
    font-weight: 700;
    color: var(--pr-text);
    margin-bottom: 8px;
    line-height: 1.25;
}

.step-subtitle {
    font-size: 15px;
    color: var(--pr-text-secondary);
    margin-bottom: 32px;
}

.step-hint {
    margin-top: 16px;
    font-size: 12px;
    color: var(--pr-text-muted);
    text-align: center;
}

/* Zwischenueberschrift innerhalb eines Schritts (Schritt 5: Objektadresse) */
.step-subhead {
    margin: 28px 0 12px;
    font-size: 15px;
    font-weight: 600;
    color: var(--pr-text);
}

/* ── Choice Grid ── */
.choice-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.choice-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 28px 16px;
    background: var(--pr-white-06);
    border: 2px solid var(--pr-white-10);
    border-radius: var(--radius-md);
    color: var(--pr-text);
    font-family: inherit;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: center;
}

.choice-btn:hover {
    border-color: var(--pr-blue-start);
    background: var(--pr-blue-subtle);
    transform: translateY(-2px);
}

.choice-btn.selected {
    border-color: var(--pr-blue-start);
    background: var(--pr-blue-subtle);
    box-shadow: 0 0 20px var(--pr-blue-glow);
}

/* Vier bzw. drei Kacheln (Schritt 4/5): schmalere Kacheln, sonst identisch
   zum Muster aus Schritt 1. */
.choice-grid-wide .choice-btn { padding: 20px 12px; }

.choice-icon { font-size: 32px; line-height: 1; }
.choice-label { font-size: 16px; font-weight: 600; }
.choice-desc { font-size: 12px; color: var(--pr-text-secondary); }

/* ── Object Card ── */
.object-card {
    background: var(--pr-white-06);
    border: 1px solid var(--pr-white-10);
    border-radius: var(--radius-md);
    padding: 20px;
    margin-bottom: 16px;
}

.object-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
}

.object-card-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--pr-text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.remove-object-btn {
    background: none;
    border: none;
    color: var(--pr-text-muted);
    font-size: 18px;
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    transition: color 0.15s;
    line-height: 1;
}
.remove-object-btn:hover { color: var(--pr-red); }

.unit-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.add-object-btn {
    width: 100%;
    padding: 12px;
    background: none;
    border: 1px dashed var(--pr-white-10);
    border-radius: var(--radius-md);
    color: var(--pr-text-secondary);
    font-family: inherit;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s;
    margin-bottom: 24px;
}
.add-object-btn:hover {
    border-color: var(--pr-blue-start);
    color: var(--pr-blue-start);
}

/* ── Form Fields ── */
.field-row {
    display: flex;
    gap: 16px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}

.field-group {
    flex: 1;
    min-width: 100px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.field-group.full  { flex: 1 1 100%; }
.field-group.narrow { flex: 0 0 80px; }

label {
    font-size: 13px;
    font-weight: 500;
    color: var(--pr-text-secondary);
}

.req-marker { color: var(--pr-blue-start); }

input[type="text"],
input[type="email"],
input[type="tel"],
input[type="number"] {
    width: 100%;
    padding: 12px 14px;
    background: var(--pr-white-06);
    border: 1px solid var(--pr-white-10);
    border-radius: var(--radius-sm);
    color: var(--pr-text);
    font-family: inherit;
    font-size: 15px;
    transition: border-color 0.2s, box-shadow 0.2s;
    outline: none;
    appearance: none;
    -webkit-appearance: none;
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="tel"]:focus,
input[type="number"]:focus {
    border-color: var(--pr-blue-start);
    box-shadow: 0 0 0 3px var(--pr-blue-subtle);
}

input[type="text"]::placeholder,
input[type="email"]::placeholder,
input[type="tel"]::placeholder,
input[type="number"]::placeholder {
    color: var(--pr-text-muted);
}

input.error-field { border-color: var(--pr-red); }

/* ── Plausibilitaets-Hinweis am Feld (ADR-025) ──
   Gleiches visuelles Muster wie .error-field/.form-error, nur in Amber statt
   Rot: ein Hinweis zur Korrektur, keine Ablehnung. Rot ist hier bewusst
   vermieden, weil die Eingabe weiterhin abgeschickt werden kann. */
input.warn-field { border-color: var(--pr-amber); }

.field-hint {
    color: var(--pr-amber);
    font-size: 13px;
    line-height: 1.45;
    margin-top: 6px;
    display: none;
}
.field-hint.visible { display: block; }

/* ── Number input ── */
input[type="number"] { -moz-appearance: textfield; }
input[type="number"]::-webkit-outer-spin-button,
input[type="number"]::-webkit-inner-spin-button { -webkit-appearance: none; }

/* ── DSGVO ── */
.dsgvo-box {
    margin: 24px 0 16px;
    padding: 16px;
    background: var(--pr-white-06);
    border: 1px solid var(--pr-white-10);
    border-radius: var(--radius-sm);
}

.dsgvo-label {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    cursor: pointer;
    font-size: 13px;
    color: var(--pr-text-secondary);
    line-height: 1.5;
}

.dsgvo-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
    margin-top: 2px;
    accent-color: var(--pr-blue-start);
    cursor: pointer;
}

.dsgvo-label a { color: var(--pr-blue-start); text-decoration: none; }
.dsgvo-label a:hover { text-decoration: underline; }

/* ── Form Error ── */
.form-error {
    min-height: 20px;
    color: var(--pr-red);
    font-size: 13px;
    margin-bottom: 8px;
    display: none;
}
.form-error.visible { display: block; }

/* ── Buttons ── */
.next-btn,
.submit-btn {
    width: 100%;
    padding: 16px 24px;
    background: linear-gradient(135deg, var(--pr-blue-start), var(--pr-blue-end));
    color: white;
    border: none;
    border-radius: var(--radius-md);
    font-family: inherit;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: all 0.2s;
    margin-top: 8px;
    box-shadow: 0 4px 20px rgba(41,171,226,0.3);
}

.next-btn:hover,
.submit-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 8px 30px rgba(41,171,226,0.45);
}

.next-btn:active,
.submit-btn:active { transform: translateY(0); }

.submit-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

/* ── Spinner ── */
.submit-spinner {
    width: 18px;
    height: 18px;
    border: 2px solid rgba(255,255,255,0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    display: none;
}

.submit-btn.loading .submit-label { opacity: 0.7; }
.submit-btn.loading .submit-spinner { display: block; }

@keyframes spin { to { transform: rotate(360deg); } }

/* ── Success Card ── */
.success-card { text-align: center; }

.success-icon {
    width: 72px;
    height: 72px;
    margin: 0 auto 24px;
    background: var(--pr-green-glow);
    border: 2px solid var(--pr-green);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    color: var(--pr-green);
    animation: scaleIn 0.4s ease;
}

@keyframes scaleIn {
    from { transform: scale(0); opacity: 0; }
    to   { transform: scale(1); opacity: 1; }
}

.success-message {
    font-size: 16px;
    color: var(--pr-text-secondary);
    margin: 16px 0 24px;
    line-height: 1.6;
}

/* Berater-Box */
.berater-box {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 20px 24px;
    background: var(--pr-surface-card, rgba(255,255,255,0.04));
    border: 1px solid var(--pr-surface-border);
    border-radius: var(--radius-md);
    margin-bottom: 20px;
}

.berater-label {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--pr-text-muted, #6b7280);
}

.berater-name {
    font-size: 20px;
    font-weight: 700;
    color: var(--pr-text-primary);
}

/* Abschluss-Hinweis */
.success-hint {
    font-size: 13px;
    color: var(--pr-text-muted, #6b7280);
    margin: 0 0 28px;
    font-style: italic;
}

.success-details {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 32px;
    text-align: left;
}

.detail-row {
    display: flex;
    gap: 12px;
    align-items: center;
    font-size: 14px;
    color: var(--pr-text-secondary);
}

.cta-secondary {
    display: inline-block;
    padding: 14px 24px;
    border: 1px solid var(--pr-surface-border);
    border-radius: var(--radius-md);
    color: var(--pr-blue-start);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s;
}
.cta-secondary:hover {
    background: var(--pr-blue-subtle);
    border-color: var(--pr-blue-start);
}

/* ── Danke-Seite (/danke/) ──
   Nutzt dasselbe Stylesheet wie der Funnel. Nur zwei Ergaenzungen, beide aus
   den bestehenden Variablen gebaut: ein primaerer Link-CTA (Optik des
   Absende-Buttons, aber als <a>) und ein Stapel-Container fuer die CTAs. */
.cta-primary {
    display: inline-block;
    padding: 14px 24px;
    background: linear-gradient(135deg, var(--pr-blue-start), var(--pr-blue-end));
    border: 1px solid transparent;
    border-radius: var(--radius-md);
    color: #fff;
    text-decoration: none;
    font-size: 15px;
    font-weight: 600;
    box-shadow: 0 4px 20px rgba(41,171,226,0.3);
    transition: all 0.2s;
}
.cta-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 8px 30px rgba(41,171,226,0.45);
}

.danke-actions {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    margin-bottom: 28px;
}
.danke-actions:last-child { margin-bottom: 0; }
.danke-actions .success-hint,
.danke-actions .step-hint { margin: 0; }

/* ── Footer ── */
.funnel-footer {
    padding: 20px;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    font-size: 13px;
    color: var(--pr-text-muted);
    border-top: 1px solid var(--pr-white-06);
}

.funnel-footer a { color: var(--pr-text-muted); text-decoration: none; }
.funnel-footer a:hover { color: var(--pr-text-secondary); }

/* ── Responsive ── */
@media (max-width: 780px) {
    .hero-price-grid { grid-template-columns: 1fr; }
}

@media (max-width: 480px) {
    .step-card { padding: 28px 20px; }
    .choice-grid { grid-template-columns: 1fr; }
    .unit-row { grid-template-columns: 1fr; }
    .field-group.narrow { flex: 1 1 100%; }
    .hero-premium { padding: 20px 16px 0; }
}
