/* ===========================
   HB ASSOCIATI — FORMULÁRIO DE ATENDIMENTO
   Design v2.0 — Wizard / Step-by-Step
   =========================== */

:root {
    --wine: #7c1c13;
    --wine-light: rgba(124, 28, 19, 0.07);
    --wine-border: rgba(124, 28, 19, 0.2);
    --wine-mid: rgba(124, 28, 19, 0.5);
    --black: #111111;
    --ink: #1a1a1a;
    --ink-mid: #444444;
    --ink-light: #777777;
    --ink-faint: #aaaaaa;
    --white: #ffffff;
    --off-white: #f9f9f8;
    --border: rgba(0, 0, 0, 0.08);
    --panel-bg: #0f0d0d;
    --panel-text: #e8e2e2;
    --transition: all 0.32s cubic-bezier(0.16, 1, 0.3, 1);
    --radius: 8px;
    --radius-sm: 6px;
}

*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

html { scroll-behavior: smooth; }

body {
    font-family: 'DM Sans', sans-serif;
    background: var(--off-white);
    color: var(--ink);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    min-height: 100vh;
}

/* ===========================
   TOPBAR (mobile only)
   =========================== */
.topbar {
    display: block;
    width: 100%;
    background: var(--white);
    border-bottom: 1px solid var(--border);
    position: fixed;
    top: 0;
    z-index: 100;
}
.topbar-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.topbar-logo {
    height: 32px;
    width: auto;
    object-fit: contain;
}

/* ===========================
   LAYOUT: SPLIT PANEL
   =========================== */
.page-wrapper {
    display: flex;
    min-height: 100vh;
    padding-top: 56px;
}

.brand-panel { display: none; }

.form-panel {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 32px 20px 60px;
    background: var(--off-white);
}

/* ===========================
   MOBILE HEADER
   =========================== */
.mobile-header {
    text-align: center;
    padding: 24px 0 22px;
    border-bottom: 1px solid var(--border);
    margin-bottom: 24px;
}
.mobile-badge {
    display: inline-block;
    font-size: 0.58rem;
    letter-spacing: 2.5px;
    text-transform: uppercase;
    color: var(--wine);
    border: 1px solid var(--wine-border);
    padding: 4px 12px;
    border-radius: 20px;
    margin-bottom: 12px;
}
.mobile-title {
    font-family: 'DM Serif Display', serif;
    font-size: 2.1rem;
    font-weight: 400;
    line-height: 1.15;
    color: var(--ink);
    margin-bottom: 10px;
}
.mobile-title em {
    font-style: italic;
    color: var(--wine);
}
.mobile-desc {
    font-size: 0.85rem;
    color: var(--ink-light);
    line-height: 1.65;
    max-width: 310px;
    margin: 0 auto;
}

/* ===========================
   FORM CARD
   =========================== */
.form-card {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 36px 28px;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.05);
    max-width: 560px;
    margin: 0 auto;
    width: 100%;
    min-height: 360px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

/* ===========================
   INTRO SCREEN
   =========================== */
#intro-screen {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 12px 0 8px;
    flex: 1;
    justify-content: center;
    gap: 4px;
}

.intro-badge {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.5px;
    color: var(--wine);
    background: var(--wine-light);
    border: 1px solid var(--wine-border);
    padding: 6px 14px;
    border-radius: 20px;
    margin-bottom: 20px;
}
.clock-icon { font-size: 0.85rem; }

.intro-title {
    font-family: 'DM Serif Display', serif;
    font-size: 2rem;
    font-weight: 400;
    line-height: 1.15;
    color: var(--ink);
    margin-bottom: 14px;
}

.intro-desc {
    font-size: 0.88rem;
    color: var(--ink-light);
    line-height: 1.7;
    max-width: 380px;
    margin: 0 auto 28px;
}

.btn-start {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 15px 32px;
    background: var(--wine);
    color: #fff;
    border: none;
    border-radius: var(--radius-sm);
    font-family: 'DM Sans', sans-serif;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    letter-spacing: 0.2px;
}
.btn-start:hover {
    background: #6a1710;
    box-shadow: 0 6px 20px rgba(124, 28, 19, 0.28);
    transform: translateY(-1px);
}
.btn-start:active { transform: translateY(0); }

.btn-arrow { font-size: 1rem; }

.intro-note {
    font-size: 0.73rem;
    color: var(--ink-faint);
    margin-top: 12px;
}

/* ===========================
   PROGRESS BAR
   =========================== */
.progress-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 36px;
}
.progress-bar-wrap {
    flex: 1;
    height: 3px;
    background: rgba(0,0,0,0.07);
    border-radius: 10px;
    overflow: hidden;
}
.progress-bar {
    height: 100%;
    background: var(--wine);
    border-radius: 10px;
    transition: width 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    width: 11.11%; /* 1/9 */
}
.progress-label {
    font-size: 0.7rem;
    font-weight: 500;
    color: var(--ink-faint);
    white-space: nowrap;
    min-width: 40px;
    text-align: right;
}

/* ===========================
   STEP / PERGUNTA
   =========================== */
.step {
    flex: 1;
    animation: stepIn 0.3s ease both;
}

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

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    20%       { transform: translateX(-6px); }
    40%       { transform: translateX(6px); }
    60%       { transform: translateX(-4px); }
    80%       { transform: translateX(4px); }
}

.input-error {
    border-color: var(--wine) !important;
    box-shadow: 0 0 0 3px var(--wine-light) !important;
}

.step-tag {
    font-size: 0.6rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--wine);
    margin-bottom: 10px;
    opacity: 0.8;
}

.step-question {
    font-family: 'DM Serif Display', serif;
    font-size: 1.5rem;
    font-weight: 400;
    line-height: 1.3;
    color: var(--ink);
    margin-bottom: 24px;
}
.step-question em {
    font-style: italic;
    color: var(--wine);
}

/* Banner de transição: caso → identificação */
.transition-banner {
    display: flex;
    align-items: center;
    gap: 10px;
    background: var(--wine-light);
    border: 1px solid var(--wine-border);
    border-radius: var(--radius-sm);
    padding: 11px 15px;
    margin-bottom: 20px;
    font-size: 0.82rem;
    color: var(--wine);
    font-weight: 500;
    line-height: 1.4;
}
.transition-icon {
    width: 22px;
    height: 22px;
    background: var(--wine);
    color: #fff;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    font-weight: 700;
    flex-shrink: 0;
}

/* Hint abaixo de perguntas */
.step-hint {
    font-size: 0.8rem;
    color: var(--ink-faint);
    margin-bottom: 14px;
    margin-top: -16px;
}

/* ===========================
   FIELDS (texto/número)
   =========================== */
.field { margin-bottom: 0; }

input[type="text"],
input[type="number"],
input[type="tel"],
input[type="email"] {
    width: 100%;
    padding: 13px 16px;
    font-family: 'DM Sans', sans-serif;
    font-size: 0.95rem;
    color: var(--ink);
    background: var(--off-white);
    border: 1.5px solid var(--border);
    border-radius: var(--radius-sm);
    transition: var(--transition);
    -webkit-appearance: none;
    appearance: none;
}
input::placeholder {
    color: var(--ink-faint);
    font-size: 0.88rem;
}
input[type="text"]:focus,
input[type="number"]:focus {
    outline: none;
    background: var(--white);
    border-color: var(--wine);
    box-shadow: 0 0 0 3px var(--wine-light);
}

/* ===========================
   RADIO GROUPS
   =========================== */
.radio-group {
    display: flex;
    flex-direction: column;
    gap: 9px;
}

.radio-option {
    display: flex !important;
    align-items: center;
    gap: 13px;
    padding: 13px 16px;
    border: 1.5px solid var(--border);
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: var(--transition);
    background: var(--off-white);
    font-family: 'DM Sans', sans-serif !important;
    font-size: 0.92rem !important;
    font-weight: 400 !important;
    color: var(--ink-mid) !important;
    text-transform: none !important;
    letter-spacing: 0 !important;
    margin-bottom: 0 !important;
    line-height: 1.4;
    user-select: none;
}
.radio-option:hover {
    background: var(--white);
    border-color: var(--wine-mid);
    color: var(--wine) !important;
}
.radio-option input[type="radio"] {
    width: 17px !important;
    min-width: 17px;
    height: 17px !important;
    margin: 0;
    padding: 0;
    accent-color: var(--wine);
    cursor: pointer;
    flex-shrink: 0;
    border: none;
    background: none;
}
.radio-option input[type="radio"]:checked ~ span {
    color: var(--wine);
    font-weight: 500;
}
.radio-option:has(input[type="radio"]:checked) {
    background: var(--wine-light);
    border-color: var(--wine-border);
}

/* Campo outro */
.outro-input {
    margin-top: 10px;
    width: 100%;
    padding: 12px 14px;
    font-family: 'Inter', sans-serif;
    font-size: 0.88rem;
    color: var(--ink);
    background: var(--off-white);
    border: 1.5px solid var(--border);
    border-radius: var(--radius-sm);
    transition: var(--transition);
}
.outro-input:focus {
    outline: none;
    background: var(--white);
    border-color: var(--wine);
    box-shadow: 0 0 0 3px var(--wine-light);
}

/* ===========================
   NAVIGATION (Voltar / Continuar)
   =========================== */
.step-nav {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 28px;
}

.btn-back {
    padding: 13px 18px;
    background: transparent;
    color: var(--ink-light);
    border: 1.5px solid var(--border);
    border-radius: var(--radius-sm);
    font-family: 'DM Sans', sans-serif;
    font-size: 0.84rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    white-space: nowrap;
}
.btn-back:hover {
    border-color: var(--ink-mid);
    color: var(--ink);
}

.btn-next {
    flex: 1;
    padding: 14px 20px;
    background: var(--wine);
    color: #fff;
    border: none;
    border-radius: var(--radius-sm);
    font-family: 'DM Sans', sans-serif;
    font-size: 0.88rem;
    font-weight: 600;
    letter-spacing: 0.2px;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}
.btn-next:hover {
    background: #6a1710;
    box-shadow: 0 5px 16px rgba(124, 28, 19, 0.28);
    transform: translateY(-1px);
}
.btn-next:active { transform: translateY(0); }

.btn-submit {
    flex: 1;
    padding: 14px 20px;
    background: var(--wine);
    color: #fff;
    border: none;
    border-radius: var(--radius-sm);
    font-family: 'DM Sans', sans-serif;
    font-size: 0.88rem;
    font-weight: 600;
    letter-spacing: 0.2px;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}
.btn-submit:hover {
    background: #6a1710;
    box-shadow: 0 5px 16px rgba(124, 28, 19, 0.28);
    transform: translateY(-1px);
}
.btn-submit:disabled {
    opacity: 0.65;
    cursor: not-allowed;
    transform: none;
}

.spinner {
    display: none;
    width: 17px;
    height: 17px;
    border: 2px solid rgba(255,255,255,0.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ===========================
   SUCCESS STATE
   =========================== */
.success-state {
    text-align: center;
    padding: 50px 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}
.success-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 58px;
    height: 58px;
    background: var(--wine-light);
    border: 2px solid var(--wine-border);
    border-radius: 50%;
    font-size: 1.4rem;
    color: var(--wine);
    margin-bottom: 20px;
    font-weight: 600;
}
.success-state h2 {
    font-family: 'DM Serif Display', serif;
    font-size: 1.8rem;
    font-weight: 400;
    color: var(--ink);
    margin-bottom: 12px;
}
.success-state p {
    font-size: 0.88rem;
    color: var(--ink-light);
    line-height: 1.75;
    max-width: 380px;
}
.btn-whatsapp {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: 22px;
    padding: 14px 28px;
    background: #25D366;
    color: #fff;
    font-family: 'DM Sans', sans-serif;
    font-size: 0.9rem;
    font-weight: 600;
    border-radius: var(--radius-sm);
    text-decoration: none;
    transition: var(--transition);
    box-shadow: 0 4px 14px rgba(37, 211, 102, 0.35);
}
.btn-whatsapp:hover {
    background: #1ebe5d;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(37, 211, 102, 0.45);
}

@keyframes pulseWhatsApp {
    0% {
        box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.7);
        transform: scale(1);
    }
    50% {
        box-shadow: 0 0 0 16px rgba(37, 211, 102, 0);
        transform: scale(1.04);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(37, 211, 102, 0);
        transform: scale(1);
    }
}

.btn-pulse {
    animation: pulseWhatsApp 2s infinite;
}

/* ===========================
   MOBILE FOOTER
   =========================== */
.mobile-footer {
    text-align: center;
    margin-top: 32px;
    padding-top: 20px;
    border-top: 1px solid var(--border);
    max-width: 560px;
    width: 100%;
    margin-left: auto;
    margin-right: auto;
}
.mobile-footer p {
    font-size: 0.76rem;
    color: var(--ink-faint);
    margin-bottom: 4px;
}
.copyright {
    font-size: 0.68rem;
    color: rgba(0,0,0,0.22) !important;
}

/* ===========================
   DESKTOP: SPLIT-PANEL
   =========================== */
@media (min-width: 900px) {

    .topbar { display: none; }

    .page-wrapper {
        padding-top: 0;
        min-height: 100vh;
    }

    .brand-panel {
        display: flex;
        width: 360px;
        min-width: 360px;
        background: var(--panel-bg);
        min-height: 100vh;
        position: sticky;
        top: 0;
        align-self: flex-start;
        height: 100vh;
    }
    .brand-panel-inner {
        display: flex;
        flex-direction: column;
        padding: 56px 40px;
        height: 100%;
    }
    .brand-panel-logo { margin-bottom: 44px; }
    .logo-img {
        width: 110px;
        height: 110px;
        object-fit: contain;
        background: #ffffff;
        border-radius: 50%;
        padding: 8px;
        display: block;
        box-shadow: 0 4px 20px rgba(0,0,0,0.4);
    }
    .brand-panel-label {
        font-size: 0.56rem;
        letter-spacing: 3px;
        text-transform: uppercase;
        color: var(--wine);
        margin-bottom: 14px;
        font-weight: 600;
    }
    .brand-panel-title {
        font-family: 'DM Serif Display', serif;
        font-size: 2.65rem;
        font-weight: 400;
        line-height: 1.1;
        color: var(--panel-text);
        margin-bottom: 18px;
    }
    .brand-panel-title em {
        font-style: italic;
        color: #c4463a;
    }
    .brand-panel-desc {
        font-size: 0.83rem;
        color: rgba(232,226,226,0.5);
        line-height: 1.8;
        margin-bottom: 36px;
    }
    .brand-panel-content { flex: 1; }
    .brand-panel-details {
        display: flex;
        flex-direction: column;
        gap: 14px;
    }
    .detail-item {
        display: flex;
        align-items: flex-start;
        gap: 12px;
        font-size: 0.81rem;
        color: rgba(232,226,226,0.55);
        line-height: 1.5;
    }
    .detail-icon {
        color: var(--wine);
        font-size: 0.85rem;
        flex-shrink: 0;
        margin-top: 2px;
    }
    .brand-panel-footer {
        border-top: 1px solid rgba(255,255,255,0.06);
        padding-top: 24px;
    }
    .brand-panel-footer > span {
        font-size: 0.7rem;
        color: rgba(232,226,226,0.22);
        letter-spacing: 0.3px;
    }

    /* RIGHT PANEL */
    .form-panel {
        flex: 1;
        padding: 0;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        min-height: 100vh;
        background: var(--off-white);
        padding: 60px 60px 80px;
    }
    .mobile-header { display: none; }
    .mobile-footer { display: none; }
    .form-card {
        max-width: 580px;
        padding: 52px 56px;
        box-shadow: 0 12px 48px rgba(0,0,0,0.06), 0 2px 8px rgba(0,0,0,0.04);
        min-height: 440px;
    }
    .step-question { font-size: 1.65rem; }
    .intro-title { font-size: 2.1rem; }
}

@media (min-width: 1200px) {
    .brand-panel { width: 420px; min-width: 420px; }
    .brand-panel-inner { padding: 68px 52px; }
    .form-panel { padding: 72px 80px 80px; }
}