﻿:root {
    --bg-primary: #0B0B0B;
    --bg-secondary: #121212;
    --bg-card: #171717;
    --bg-card-hover: #1E1E1E;
    --gold: #C9A227;
    --gold-light: #E0C36E;
    --gold-dim: rgba(201, 162, 39, 0.15);
    --gold-glow: rgba(201, 162, 39, 0.08);
    --text: #F5F5F5;
    --text-muted: #999999;
    --text-dim: #666666;
    --error: #E74C3C;
    --error-bg: rgba(231, 76, 60, 0.1);
    --border: rgba(255, 255, 255, 0.06);
    --border-gold: rgba(201, 162, 39, 0.3);
    --radius: 12px;
    --radius-lg: 16px;
    --radius-sm: 8px;
    --shadow: 0 4px 24px rgba(0, 0, 0, 0.3);
    --shadow-gold: 0 0 30px rgba(201, 162, 39, 0.1);
    --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background-color: var(--bg-primary);
    color: var(--text);
    line-height: 1.6;
    min-height: 100vh;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

body::before {
    content: '';
    position: fixed;
    top: -40%;
    left: 50%;
    transform: translateX(-50%);
    width: 120%;
    height: 80%;
    background: radial-gradient(ellipse at center, var(--gold-glow) 0%, transparent 65%);
    pointer-events: none;
    z-index: 0;
}

.app {
    position: relative;
    z-index: 1;
    max-width: 900px;
    margin: 0 auto;
    padding: 0 20px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

h1, h2, h3, h4 { font-family: 'Playfair Display', Georgia, serif; font-weight: 600; }
.hidden { display: none !important; }
.fade-in { animation: fadeIn 0.5s ease forwards; }

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(12px); }
    to { opacity: 1; transform: translateY(0); }
}
@keyframes slideUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}
@keyframes shake {
    0%, 100% { transform: translateX(0); }
    20% { transform: translateX(-6px); }
    40% { transform: translateX(6px); }
    60% { transform: translateX(-4px); }
    80% { transform: translateX(4px); }
}
@keyframes glowPulse {
    0%, 100% { box-shadow: 0 0 5px rgba(201, 162, 39, 0.2); }
    50% { box-shadow: 0 0 20px rgba(201, 162, 39, 0.35); }
}
@keyframes numberCount {
    from { opacity: 0; transform: scale(0.8); }
    to { opacity: 1; transform: scale(1); }
}

/* Header */
.header { text-align: center; padding: 30px 0 10px; display: flex; flex-direction: column; align-items: center; gap: 8px; }
.header-logo-large {
    width: 280px;
    height: auto;
    display: block;
}
.header-brand {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 2rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    color: var(--gold);
    text-shadow: 0 0 30px rgba(201, 162, 39, 0.2);
}
.header-subtitle {
    font-size: 0.85rem;
    color: var(--text-muted);
    letter-spacing: 0.15em;
    text-transform: uppercase;
}

/* Progress */
.progress { display: flex; align-items: center; justify-content: center; padding: 30px 0 40px; }
.progress-step { display: flex; flex-direction: column; align-items: center; gap: 8px; z-index: 1; }
.progress-number {
    width: 36px; height: 36px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 0.8rem; font-weight: 600;
    background: var(--bg-card); border: 2px solid var(--border); color: var(--text-dim);
    transition: var(--transition);
}
.progress-step.active .progress-number { border-color: var(--gold); color: var(--gold); background: var(--gold-dim); }
.progress-step.current .progress-number { background: var(--gold); color: var(--bg-primary); border-color: var(--gold); animation: glowPulse 2s ease-in-out infinite; }
.progress-label { font-size: 0.7rem; color: var(--text-dim); text-transform: uppercase; letter-spacing: 0.08em; transition: var(--transition); }
.progress-step.active .progress-label { color: var(--text-muted); }
.progress-step.current .progress-label { color: var(--gold); }
.progress-line { width: 60px; height: 2px; background: var(--border); margin: 0 8px; margin-bottom: 22px; transition: var(--transition); }
.progress-line.active { background: var(--gold); }

/* Step sections */
.step-section { flex: 1; padding-bottom: 60px; }

/* Hero Image */
.hero-image-wrapper {
    position: relative;
    width: 100%;
    border-radius: var(--radius-lg);
    overflow: hidden;
    margin-bottom: 24px;
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
}
.hero-image {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
    max-height: 320px;
}
.hero-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 50%;
    background: linear-gradient(to top, rgba(11, 11, 11, 0.9) 0%, transparent 100%);
    pointer-events: none;
}

/* Lead Form */
.lead-card {
    background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-lg);
    padding: 40px; box-shadow: var(--shadow); animation: slideUp 0.5s ease;
}
.lead-heading { font-size: 1.6rem; color: var(--text); margin-bottom: 8px; line-height: 1.3; }
.lead-description { color: var(--text-muted); font-size: 0.95rem; margin-bottom: 32px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.form-group { display: flex; flex-direction: column; gap: 6px; }
.form-group.full-width { grid-column: 1 / -1; }
.form-label { font-size: 0.8rem; font-weight: 500; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.05em; }
.form-input {
    padding: 14px 16px; background: var(--bg-secondary); border: 1px solid var(--border);
    border-radius: var(--radius-sm); color: var(--text); font-size: 1rem; font-family: 'Inter', sans-serif;
    transition: var(--transition); outline: none;
}
.form-input::placeholder { color: var(--text-dim); }
.form-input:focus { border-color: var(--gold); box-shadow: 0 0 0 3px var(--gold-dim); }
.form-input.input-error { border-color: var(--error); box-shadow: 0 0 0 3px var(--error-bg); animation: shake 0.4s ease; }
select.form-input { cursor: pointer; appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23999' 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: 36px; }
select.form-input option { background: var(--bg-secondary); color: var(--text); }
.input-wrapper { position: relative; display: flex; align-items: center; }
.input-unit { position: absolute; right: 16px; color: var(--text-dim); font-size: 0.85rem; pointer-events: none; }
.form-group .form-input.has-unit { padding-right: 40px; }
.error-message { font-size: 0.78rem; color: var(--error); min-height: 0; opacity: 0; transition: var(--transition); overflow: hidden; }
.error-message.visible { min-height: 18px; opacity: 1; }

/* Buttons */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    padding: 14px 32px; border: none; border-radius: var(--radius-sm);
    font-family: 'Inter', sans-serif; font-size: 1rem; font-weight: 600;
    cursor: pointer; transition: var(--transition); outline: none; text-decoration: none;
}
.btn-primary {
    background: var(--gold); color: var(--bg-primary);
    box-shadow: 0 4px 15px rgba(201, 162, 39, 0.3);
}
.btn-primary:hover {
    background: var(--gold-light);
    box-shadow: 0 6px 25px rgba(201, 162, 39, 0.4);
    transform: translateY(-1px);
}
.btn-primary:active { transform: translateY(0); }
.btn-secondary { background: var(--bg-card); color: var(--text); border: 1px solid var(--border); }
.btn-secondary:hover { border-color: var(--gold); color: var(--gold); }
.form-submit { margin-top: 24px; width: 100%; }
.form-submit .btn { width: 100%; }

/* Furniture Cards */
.calc-header { text-align: center; margin-bottom: 32px; }
.calc-area-label { font-size: 0.85rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.1em; }
.calc-area-value { font-family: 'Playfair Display', Georgia, serif; font-size: 2rem; color: var(--gold); margin-top: 4px; }

.furniture-list { display: flex; flex-direction: column; gap: 12px; }

.furniture-card {
    background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius);
    overflow: hidden; transition: var(--transition);
}
.furniture-card:hover { border-color: rgba(255, 255, 255, 0.1); }
.furniture-card.active { border-color: var(--border-gold); box-shadow: var(--shadow-gold); }

.card-header {
    display: flex; align-items: center; gap: 16px; padding: 18px 20px;
    cursor: pointer; transition: var(--transition); user-select: none;
}
.card-header:hover { background: rgba(255, 255, 255, 0.02); }

.card-toggle {
    width: 28px; height: 28px; border-radius: 50%;
    border: 2px solid var(--border); display: flex; align-items: center; justify-content: center;
    flex-shrink: 0; transition: var(--transition);
}
.furniture-card.active .card-toggle { border-color: var(--gold); background: var(--gold-dim); }
.toggle-indicator { font-size: 0.75rem; color: var(--gold); font-weight: 700; }
.card-info { flex: 1; min-width: 0; }
.card-title { font-size: 1rem; font-weight: 600; color: var(--text); margin: 0; }
.card-description { font-size: 0.82rem; color: var(--text-muted); margin-top: 4px; font-family: 'Inter', sans-serif; letter-spacing: 0.02em; }
.card-subtotal { font-size: 0.9rem; font-weight: 600; color: var(--text-dim); flex-shrink: 0; min-width: 100px; text-align: right; }
.furniture-card.active .card-subtotal { color: var(--gold-light); }

.card-body {
    max-height: 0; overflow: hidden; transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}
.card-body.expanded { max-height: 600px; }

.config-grid {
    display: grid; grid-template-columns: 1fr 1fr; gap: 16px;
    padding: 0 20px 20px; border-top: 1px solid var(--border); padding-top: 16px;
}
.config-field { display: flex; flex-direction: column; gap: 5px; }
.config-label { font-size: 0.75rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.05em; }
.config-input, .config-select {
    padding: 10px 12px; background: var(--bg-secondary); border: 1px solid var(--border);
    border-radius: var(--radius-sm); color: var(--text); font-size: 0.9rem;
    font-family: 'Inter', sans-serif; transition: var(--transition); outline: none; width: 100%;
}
.config-input:focus, .config-select:focus { border-color: var(--gold); }
.config-select { cursor: pointer; appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23999' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; padding-right: 32px; }
.config-select option { background: var(--bg-secondary); color: var(--text); }

/* Live Summary */
.live-summary {
    background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-lg);
    padding: 24px; margin-top: 24px;
}
.summary-title { font-size: 0.8rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.1em; margin-bottom: 16px; }
.summary-empty { text-align: center; padding: 20px 0; }
.summary-empty p { color: var(--text-dim); }
.summary-hint { font-size: 0.85rem; margin-top: 4px; }
.summary-list { display: flex; flex-direction: column; gap: 8px; }
.summary-item { display: flex; align-items: center; gap: 12px; padding: 8px 0; }
.summary-check { color: var(--gold); font-weight: 700; font-size: 0.9rem; }
.summary-name { flex: 1; font-size: 0.9rem; color: var(--text); }
.summary-price { font-size: 0.8rem; font-weight: 600; color: var(--gold-light); }

.summary-total { border-top: 1px solid var(--border); margin-top: 12px; padding-top: 16px; text-align: center; }
.total-label { font-size: 0.8rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.1em; }
.total-usd { font-family: 'Playfair Display', Georgia, serif; font-size: 1.5rem; color: var(--gold); margin-top: 8px; animation: numberCount 0.4s ease; }
.summary-discount { font-size: 0.85rem; color: #27ae60; margin-top: 8px; }
.summary-total-old { text-decoration: line-through; color: var(--text-dim); opacity: 0.7; }
.summary-final { font-size: 1.2rem; color: var(--gold); font-weight: 600; margin-top: 8px; }

.no-selection-msg {
    text-align: center; padding: 16px; margin-top: 16px;
    background: var(--error-bg); border: 1px solid rgba(231, 76, 60, 0.3);
    border-radius: var(--radius-sm); color: var(--error);
    opacity: 0; transition: var(--transition); pointer-events: none;
}
.no-selection-msg.visible { opacity: 1; }

.calc-actions { display: flex; gap: 12px; margin-top: 24px; justify-content: center; }

/* Step 3 — Result */
.result-card {
    background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-lg);
    padding: 50px 40px; box-shadow: var(--shadow); text-align: center; animation: slideUp 0.5s ease;
}
.result-greeting { font-size: 1.1rem; color: var(--text-muted); line-height: 1.6; max-width: 600px; margin: 0 auto 24px; }
.result-name { color: var(--gold); font-weight: 600; font-family: 'Playfair Display', Georgia, serif; }

/* Result Prices */
.result-prices { text-align: center; margin: 20px 0 28px; }
.result-price-final {
    font-family: 'Playfair Display', Georgia, serif; font-size: 2.5rem; color: var(--gold);
    animation: numberCount 0.6s ease;
    text-shadow: 0 0 40px rgba(201, 162, 39, 0.2);
    word-break: break-word;
    transition: all 0.4s ease;
}
.result-price-final.strikethrough {
    text-decoration: line-through; text-decoration-color: rgba(255,255,255,0.3);
    opacity: 0.5; font-size: 1.5rem; color: var(--text-dim);
}
.result-discount-btn {
    display: inline-block; margin: 20px auto; padding: 12px 32px;
    background: rgba(39, 174, 96, 0.15); border: 1px solid rgba(39, 174, 96, 0.4);
    border-radius: var(--radius-sm); color: #27ae60; font-size: 1rem; font-weight: 600;
    cursor: pointer; transition: var(--transition);
}
.result-discount-btn:hover { background: rgba(39, 174, 96, 0.25); border-color: #27ae60; transform: translateY(-1px); }
.discount-reveal {
    max-height: 0; overflow: hidden; opacity: 0;
    transition: max-height 0.5s ease, opacity 0.4s ease, margin 0.4s ease;
    margin: 0;
}
.discount-reveal.visible {
    max-height: 300px; opacity: 1; margin: 20px 0;
}
.result-discounted-price {
    font-size: 2.5rem; color: var(--gold); opacity: 0;
    animation: fadeIn 0.5s ease 0.3s forwards;
}
.result-discount-row {
    display: flex; justify-content: center; align-items: center; gap: 12px;
    margin: 12px 0; padding: 10px 20px;
    background: rgba(39, 174, 96, 0.1); border: 1px solid rgba(39, 174, 96, 0.2);
    border-radius: var(--radius-sm); max-width: 400px; margin-left: auto; margin-right: auto;
}
.discount-label { font-size: 0.95rem; color: #27ae60; font-weight: 600; }
.discount-amount { font-size: 0.95rem; color: #27ae60; font-weight: 600; }
.result-divider { width: 60px; height: 1px; background: var(--border); margin: 16px auto; }
.result-disclaimer { font-size: 0.9rem; color: var(--text-dim); line-height: 1.6; margin-bottom: 40px; padding: 20px; background: var(--bg-secondary); border-radius: var(--radius-sm); max-width: 500px; margin-left: auto; margin-right: auto; }
.result-contact { padding-top: 30px; border-top: 1px solid var(--border); }
.contact-title { font-size: 1rem; color: var(--text-muted); margin-bottom: 16px; }
.contact-phones { display: flex; flex-direction: column; gap: 8px; margin-bottom: 12px; }
.contact-phone {
    display: inline-block; padding: 12px 24px; background: var(--bg-secondary);
    border: 1px solid var(--border); border-radius: var(--radius-sm);
    color: var(--gold); text-decoration: none; font-size: 1.1rem; font-weight: 500;
    transition: var(--transition);
}
.contact-phone:hover { border-color: var(--gold); box-shadow: var(--shadow-gold); transform: translateY(-1px); }
.contact-website {
    display: inline-block; padding: 10px 24px; color: var(--text-muted);
    text-decoration: none; font-size: 0.9rem; transition: var(--transition);
}
.contact-website:hover { color: var(--gold); }
.result-actions { margin-top: 32px; }

/* Footer */
.footer { text-align: center; padding: 30px 0; margin-top: auto; }
.footer-text { font-size: 0.75rem; color: var(--text-dim); }

/* Responsive — Large Desktop */
@media (min-width: 1200px) {
    .app { max-width: 1000px; }
    .lead-card { padding: 48px; }
    .lead-heading { font-size: 1.8rem; }
    .config-grid { grid-template-columns: 1fr 1fr; gap: 20px; }
    .result-card { padding: 60px 48px; }
    .result-price-final { font-size: 3rem; }
}

/* Responsive — Tablet */
@media (max-width: 768px) {
    .app { padding: 0 16px; }
    .header { padding: 20px 0 10px; }
    .header-logo-large { width: 220px; }
    .header-brand { font-size: 1.5rem; }
    .header-subtitle { font-size: 0.75rem; }
    .progress { padding: 20px 0 30px; }
    .progress-line { width: 40px; }
    .lead-card { padding: 28px; }
    .lead-heading { font-size: 1.3rem; }
    .form-grid { grid-template-columns: 1fr; gap: 16px; }
    .config-grid { grid-template-columns: 1fr 1fr; }
    .result-card { padding: 36px 24px; }
    .result-price-final { font-size: 2rem; }
    .result-price-final.strikethrough { font-size: 1.3rem; }
    .result-discount-btn { padding: 10px 24px; font-size: 0.9rem; }
    .result-discount-row { gap: 8px; padding: 8px 16px; }
    .discount-label, .discount-amount { font-size: 0.85rem; }
    .contact-phone { padding: 10px 20px; font-size: 1rem; }
}

/* Responsive — Mobile */
@media (max-width: 480px) {
    .app { padding: 0 12px; }
    .header { padding: 16px 0 8px; }
    .header-logo-large { width: 180px; }
    .header-brand { font-size: 1.2rem; }
    .header-subtitle { font-size: 0.65rem; letter-spacing: 0.1em; }
    .progress { padding: 16px 0 24px; }
    .progress-number { width: 28px; height: 28px; font-size: 0.65rem; }
    .progress-label { font-size: 0.55rem; }
    .progress-line { width: 24px; }
    .lead-card { padding: 20px 16px; }
    .lead-heading { font-size: 1.1rem; line-height: 1.4; }
    .lead-description { font-size: 0.85rem; }
    .form-input { padding: 12px 14px; font-size: 0.9rem; }
    .form-label { font-size: 0.7rem; }
    .btn { padding: 12px 24px; font-size: 0.9rem; }
    .calc-area-value { font-size: 1.5rem; }
    .card-header { padding: 14px 14px; gap: 10px; }
    .card-title { font-size: 0.85rem; }
    .card-description { font-size: 0.75rem; }
    .card-subtotal { font-size: 0.75rem; min-width: 70px; }
    .card-toggle { width: 24px; height: 24px; }
    .toggle-indicator { font-size: 0.65rem; }
    .config-grid { grid-template-columns: 1fr; gap: 12px; padding: 0 14px 14px; padding-top: 12px; }
    .config-label { font-size: 0.7rem; }
    .config-select, .config-input { padding: 9px 10px; font-size: 0.85rem; }
    .live-summary { padding: 16px; }
    .summary-title { font-size: 0.7rem; }
    .summary-item { gap: 8px; padding: 6px 0; }
    .summary-name { font-size: 0.8rem; }
    .summary-price { font-size: 0.7rem; }
    .total-usd { font-size: 1.2rem; }
    .summary-final { font-size: 1rem; }
    .calc-actions { flex-direction: column; gap: 10px; }
    .calc-actions .btn { width: 100%; }
    .result-card { padding: 24px 14px; }
    .result-greeting { font-size: 0.9rem; margin-bottom: 16px; }
    .result-price-final { font-size: 1.6rem; }
    .result-price-final.strikethrough { font-size: 1.1rem; }
    .result-discount-btn { padding: 10px 20px; font-size: 0.85rem; margin: 14px auto; }
    .discount-reveal.visible { margin: 14px 0; }
    .result-discount-row { flex-direction: column; gap: 4px; padding: 8px 12px; }
    .discount-label, .discount-amount { font-size: 0.8rem; }
    .result-disclaimer { padding: 14px; font-size: 0.8rem; margin-bottom: 24px; }
    .contact-phone { padding: 10px 16px; font-size: 0.9rem; }
    .contact-website { font-size: 0.8rem; }
    .result-actions { margin-top: 20px; }
    .result-actions .btn { width: 100%; }
    .footer { padding: 20px 0; }
}

/* Honeypot — bots fill it, people never see it. Checked in functions/api/lead.js. */
.hp-field {
    position: absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
    overflow: hidden;
    opacity: 0;
    pointer-events: none;
}
