/* ══════════════════════════════════════════════════════════════════
   VeldAI B2C Landing Page — Style System v2
   Mobile-first · Dark premium · Street-aware personalization
   ═══════════════════════════════════════════════════════════════ */

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

:root {
    --c-bg:        #0b1120;
    --c-surface:   #151d2f;
    --c-surface2:  #1c2640;
    --c-border:    rgba(255,255,255,0.08);
    --c-text:      #e2e8f0;
    --c-text-dim:  #94a3b8;
    --c-text-soft: #64748b;
    --c-accent:    #6c5ce7;
    --c-accent-lt: #a29bfe;
    --c-gold:      #f59e0b;
    --c-gold-bg:   rgba(245,158,11,0.10);
    --c-green:     #10b981;
    --c-green-bg:  rgba(16,185,129,0.08);
    --c-red:       #ef4444;
    --radius:      16px;
    --radius-sm:   10px;
    --radius-xs:   6px;
    --shadow:      0 8px 32px rgba(0,0,0,0.35);
    --font:        'Inter', -apple-system, system-ui, sans-serif;
}

html { font-size: 16px; -webkit-font-smoothing: antialiased; }
body {
    font-family: var(--font);
    background: var(--c-bg);
    color: var(--c-text);
    min-height: 100vh;
    overflow-x: hidden;
}

.hidden { display: none !important; }

/* ── Background Orbs ────────────────────────────────────────── */
.bg-orb {
    position: fixed; border-radius: 50%; filter: blur(100px);
    pointer-events: none; z-index: 0;
}
.orb-1 { width: 400px; height: 400px; top: -100px; right: -80px; background: rgba(108,92,231,0.12); }
.orb-2 { width: 350px; height: 350px; bottom: -50px; left: -100px; background: rgba(245,158,11,0.08); }

/* ── Page Shell ─────────────────────────────────────────────── */
.page-shell {
    position: relative; z-index: 1;
    max-width: 480px;
    margin: 0 auto;
    padding: 20px 16px 40px;
}

/* ── Street Context Banner ──────────────────────────────────── */
.street-context {
    background: linear-gradient(135deg, rgba(108,92,231,0.12), rgba(245,158,11,0.08));
    border: 1px solid rgba(108,92,231,0.25);
    border-radius: var(--radius);
    padding: 16px;
    margin-bottom: 16px;
    animation: slideDown 0.4s ease-out;
}
@keyframes slideDown {
    from { opacity: 0; transform: translateY(-12px); }
    to   { opacity: 1; transform: translateY(0); }
}
.street-context-inner {
    display: flex; align-items: center; gap: 12px;
}
.street-icon { font-size: 1.8rem; }
.street-title {
    font-size: 0.95rem; color: var(--c-text);
    line-height: 1.3;
}
.street-title strong { color: var(--c-gold); font-weight: 700; }
.street-plz { font-size: 0.82rem; color: var(--c-text-dim); margin-top: 2px; }

.street-range {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid rgba(255,255,255,0.06);
}
.range-label { font-size: 0.78rem; color: var(--c-text-dim); margin-bottom: 4px; }
.range-value {
    font-size: 1.05rem; font-weight: 700;
    color: var(--c-gold);
    line-height: 1.4;
}
.range-note { font-size: 0.68rem; color: var(--c-text-soft); margin-top: 6px; font-style: italic; }

/* ── Header ─────────────────────────────────────────────────── */
.site-header { text-align: center; padding: 8px 0 20px; }
.logo { display: flex; align-items: center; justify-content: center; gap: 8px; }
.logo-sun { font-size: 1.6rem; }
.logo-text { font-size: 1.4rem; font-weight: 800; letter-spacing: -0.5px; color: #fff; }
.site-tagline { font-size: 0.82rem; color: var(--c-text-dim); margin-top: 4px; }

/* ── Cards ──────────────────────────────────────────────────── */
.card {
    background: var(--c-surface);
    border: 1px solid var(--c-border);
    border-radius: var(--radius);
    padding: 28px 24px;
    box-shadow: var(--shadow);
    margin-bottom: 16px;
}
.card-badge {
    display: inline-block;
    background: var(--c-green-bg); color: var(--c-green);
    font-size: 0.72rem; font-weight: 600; text-transform: uppercase;
    letter-spacing: 0.8px;
    padding: 4px 12px; border-radius: 20px;
    margin-bottom: 12px;
}
.card-title { font-size: 1.3rem; font-weight: 700; color: #fff; line-height: 1.3; }
.card-subtitle { font-size: 0.85rem; color: var(--c-text-dim); margin-top: 6px; }

/* ── Form Elements ──────────────────────────────────────────── */
.field-group { margin-top: 22px; }
.field-label { font-size: 0.85rem; font-weight: 600; color: var(--c-text); margin-bottom: 10px; }
.field-error { font-size: 0.78rem; color: var(--c-red); margin-top: 6px; }

.choice-grid { display: grid; gap: 10px; grid-template-columns: repeat(3, 1fr); }
.choice-grid:has(.choice-sm) { grid-template-columns: repeat(5, 1fr); }

.choice-btn {
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    background: var(--c-surface2);
    border: 2px solid transparent;
    border-radius: var(--radius-sm);
    padding: 14px 6px;
    color: var(--c-text);
    cursor: pointer;
    transition: all 0.18s ease;
    font-family: var(--font); font-size: 0.78rem; font-weight: 500;
    line-height: 1.3; text-align: center;
    min-height: 70px;
}
.choice-btn:hover { border-color: rgba(108,92,231,0.4); background: rgba(108,92,231,0.08); }
.choice-btn.selected {
    border-color: var(--c-accent);
    background: rgba(108,92,231,0.15);
    box-shadow: 0 0 12px rgba(108,92,231,0.2);
}
.choice-btn.choice-sm { padding: 10px 4px; min-height: 48px; font-size: 0.9rem; font-weight: 600; }
.choice-icon { font-size: 1.5rem; margin-bottom: 4px; }
.choice-text { font-size: 0.72rem; line-height: 1.25; }

/* ── Buttons ────────────────────────────────────────────────── */
.btn-primary {
    display: flex; align-items: center; justify-content: center; gap: 8px;
    width: 100%; margin-top: 28px;
    background: linear-gradient(135deg, var(--c-accent), #8b5cf6);
    color: #fff; border: none; border-radius: var(--radius-sm);
    padding: 16px 24px;
    font-family: var(--font); font-size: 1rem; font-weight: 600;
    cursor: pointer;
    transition: transform 0.15s, box-shadow 0.2s;
    box-shadow: 0 4px 20px rgba(108,92,231,0.3);
}
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 6px 28px rgba(108,92,231,0.45); }
.btn-primary:active { transform: translateY(0); }

.btn-secondary {
    display: block; width: 100%; text-align: center;
    background: transparent; color: var(--c-text-dim);
    border: 1px solid var(--c-border); border-radius: var(--radius-sm);
    padding: 12px;
    font-family: var(--font); font-size: 0.85rem;
    cursor: pointer; transition: background 0.15s;
}
.btn-secondary:hover { background: rgba(255,255,255,0.04); }

.btn-cta {
    width: 100%; margin-top: 12px;
    background: linear-gradient(135deg, var(--c-gold), #d97706);
    color: #1a1a2e; border: none; border-radius: var(--radius-sm);
    padding: 14px 20px;
    font-family: var(--font); font-size: 0.92rem; font-weight: 700;
    cursor: pointer; transition: transform 0.15s, box-shadow 0.2s;
    box-shadow: 0 4px 16px rgba(245,158,11,0.3);
}
.btn-cta:hover { transform: translateY(-1px); box-shadow: 0 6px 24px rgba(245,158,11,0.45); }
.btn-cta:disabled { opacity: 0.6; cursor: not-allowed; }

/* ── Loading ────────────────────────────────────────────────── */
.loading-card { text-align: center; padding: 60px 24px; }
.spinner-ring {
    width: 56px; height: 56px; margin: 0 auto 24px;
    border: 4px solid rgba(108,92,231,0.15);
    border-top-color: var(--c-accent);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.loading-text { font-size: 1rem; font-weight: 600; color: #fff; }
.loading-sub { font-size: 0.82rem; color: var(--c-text-dim); margin-top: 6px; }

/* Loading — cancel button */
.btn-loading-cancel {
    display: inline-block; margin-top: 20px;
    background: transparent; color: var(--c-text-soft);
    border: 1px solid var(--c-border); border-radius: var(--radius-xs);
    padding: 8px 18px;
    font-family: var(--font); font-size: 0.8rem;
    cursor: pointer; transition: background 0.15s;
}
.btn-loading-cancel:hover { background: rgba(255,255,255,0.04); }

/* Loading — timeout message + retry */
.timeout-msg {
    margin-top: 24px; padding: 18px;
    background: rgba(245,158,11,0.08);
    border: 1px solid rgba(245,158,11,0.25);
    border-radius: var(--radius-sm);
    animation: slideDown 0.3s ease-out;
}
.timeout-title { font-size: 0.95rem; font-weight: 600; color: var(--c-gold); margin-bottom: 6px; }
.timeout-sub { font-size: 0.8rem; color: var(--c-text-dim); margin-bottom: 12px; }
.btn-retry {
    display: inline-block;
    background: linear-gradient(135deg, var(--c-gold), #d97706);
    color: #1a1a2e; border: none; border-radius: var(--radius-xs);
    padding: 10px 22px;
    font-family: var(--font); font-size: 0.88rem; font-weight: 600;
    cursor: pointer; transition: transform 0.15s;
}
.btn-retry:hover { transform: translateY(-1px); }

/* Email validation error */
.input-error { border-color: var(--c-red) !important; box-shadow: 0 0 8px rgba(239,68,68,0.25); }

/* Fernwärme info banner */
.fernwaerme-info {
    display: flex; align-items: flex-start; gap: 8px;
    background: rgba(245,158,11,0.08);
    border: 1px solid rgba(245,158,11,0.2);
    border-radius: var(--radius-xs);
    padding: 10px 14px; margin-top: 12px;
    font-size: 0.78rem; color: var(--c-gold); line-height: 1.45;
}

/* ── Result Hero ────────────────────────────────────────────── */
.result-hero { text-align: center; }
.result-badge {
    display: inline-block;
    font-size: 0.82rem; font-weight: 600; color: var(--c-gold);
    margin-bottom: 8px;
}
.result-headline {
    font-size: 0.9rem; color: var(--c-text-dim); font-weight: 400;
    margin-bottom: 16px;
}

.hero-kpi {
    display: flex; align-items: baseline; justify-content: center; gap: 4px;
    margin: 8px 0 4px;
}
.hero-prefix { font-size: 1.2rem; color: var(--c-text-dim); font-weight: 300; }
.hero-value {
    font-size: 3rem; font-weight: 900; color: var(--c-gold);
    letter-spacing: -1px;
    line-height: 1;
}
.hero-suffix { font-size: 1.4rem; color: var(--c-gold); font-weight: 600; }
.hero-label { font-size: 0.82rem; color: var(--c-text-dim); margin-bottom: 24px; }

/* Detail grid */
.detail-grid {
    display: grid; grid-template-columns: 1fr 1fr; gap: 12px;
    margin-top: 20px; text-align: left;
}
.detail-item {
    display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px;
    background: var(--c-surface2);
    border-radius: var(--radius-xs); padding: 12px;
}
.detail-icon { font-size: 0.9rem; width: 100%; margin-bottom: 2px; }
.detail-label { font-size: 0.7rem; color: var(--c-text-soft); width: 100%; }
.detail-value { font-size: 1.1rem; font-weight: 700; color: #fff; }
.detail-unit { font-size: 0.7rem; color: var(--c-text-dim); }

/* CO2 Banner */
.co2-banner {
    display: flex; align-items: center; gap: 8px;
    background: var(--c-green-bg);
    border: 1px solid rgba(16,185,129,0.2);
    border-radius: var(--radius-xs);
    padding: 10px 14px;
    margin-top: 20px;
    font-size: 0.82rem; color: var(--c-green);
}

/* Social proof */
.social-proof {
    margin-top: 12px; padding: 10px 14px;
    background: rgba(108,92,231,0.08);
    border: 1px solid rgba(108,92,231,0.2);
    border-radius: var(--radius-xs);
    font-size: 0.82rem; color: var(--c-accent-lt);
    text-align: center;
}

/* Detail footnote */
.detail-footnote {
    font-size: 0.70rem; color: var(--c-text-soft);
    margin: 8px 0 0; text-align: center; line-height: 1.4;
    opacity: 0.7;
}

/* ── CTA Card ───────────────────────────────────────────────── */
.cta-card { text-align: center; }
.cta-title { font-size: 1.1rem; font-weight: 700; color: #fff; margin-bottom: 8px; }
.cta-sub { font-size: 0.82rem; color: var(--c-text-dim); line-height: 1.5; margin-bottom: 16px; }

.input-field {
    width: 100%; padding: 14px 16px;
    background: var(--c-surface2);
    border: 2px solid var(--c-border);
    border-radius: var(--radius-sm);
    color: #fff; font-family: var(--font); font-size: 0.92rem;
    outline: none; transition: border-color 0.2s;
}
.input-field::placeholder { color: var(--c-text-soft); }
.input-field:focus { border-color: var(--c-accent); }
.input-field + .input-field { margin-top: 10px; }

/* Optional field visual hint */
.input-optional { border-style: dashed; }
.input-optional:focus { border-style: solid; }

/* Consent checkbox */
.consent-label {
    display: flex; align-items: flex-start; gap: 10px;
    margin: 16px 0 4px; text-align: left;
    font-size: 0.78rem; color: var(--c-text-dim); line-height: 1.45;
    cursor: pointer;
}
.consent-label input[type="checkbox"] {
    margin-top: 2px; flex-shrink: 0;
    width: 18px; height: 18px;
    accent-color: var(--c-accent);
    cursor: pointer;
}
.consent-label a { color: var(--c-accent-lt); text-decoration: underline; }
.consent-error {
    font-size: 0.75rem; color: var(--c-red, #ef4444);
    margin: 2px 0 8px; text-align: left;
}

.cta-fine {
    font-size: 0.72rem; color: var(--c-text-soft);
    margin-top: 12px; line-height: 1.5;
}

/* ── Disclaimer ─────────────────────────────────────────────── */
.disclaimer-box {
    background: rgba(255,255,255,0.02);
    border: 1px solid var(--c-border);
    border-radius: var(--radius-xs);
    padding: 14px 16px; margin-bottom: 16px;
}
.disclaimer-title { font-size: 0.78rem; font-weight: 600; color: var(--c-text-dim); margin-bottom: 6px; }
.disclaimer-text { font-size: 0.7rem; color: var(--c-text-soft); line-height: 1.55; }

/* ── Confirm ────────────────────────────────────────────────── */
.confirm-card { text-align: center; padding: 40px 24px; }
.confirm-icon { font-size: 3rem; margin-bottom: 16px; }
.confirm-title { font-size: 1.4rem; font-weight: 700; color: #fff; }
.confirm-text { font-size: 0.88rem; color: var(--c-text-dim); line-height: 1.5; margin: 12px 0 24px; }

/* ── Footer ─────────────────────────────────────────────────── */
.site-footer {
    text-align: center; padding: 20px 16px 32px;
    font-size: 0.75rem; color: var(--c-text-soft);
}
.site-footer a { color: var(--c-text-dim); text-decoration: none; }
.site-footer a:hover { text-decoration: underline; }
.footer-sep { margin: 0 8px; }

/* ── Responsive ─────────────────────────────────────────────── */
@media (max-width: 400px) {
    .page-shell { padding: 12px 12px 32px; }
    .card { padding: 22px 18px; }
    .hero-value { font-size: 2.4rem; }
    .detail-grid { gap: 8px; }
    .choice-grid { gap: 6px; }
    .choice-btn { padding: 10px 4px; min-height: 60px; }
}
