/* =========================================================
   PÁGINA DE CONTATO

   01. Hero e cartão de contato
   02. Formulário: estrutura e campos
   03. Preferências e consentimentos
   04. Envio, estados e honeypot
   05. Tablet
   06. Celular
   ========================================================= */

/* =========================================================
   01. HERO E CARTÃO DE CONTATO
   ========================================================= */

.contact-page .hero {
    isolation: isolate;
}

.contact-page .hero::before {
    top: -225px;
    right: -100px;
    width: 340px;
    height: 340px;
}

.contact-page .hero::after {
    right: 5px;
    bottom: -185px;
    width: 180px;
    height: 310px;
}

.contact-section {
    position: relative;
    z-index: 1;
    padding: 45px 0 60px;
    background-color: var(--background-soft);
}

.contact-card {
    position: relative;
    display: flex;
    align-items: center;
    gap: 30px;
    overflow: hidden;
    padding: 44px;
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius-large);
    box-shadow: var(--shadow-small);
}

.contact-card::before,
.contact-card::after {
    content: "";
    position: absolute;
    pointer-events: none;
}

.contact-card::before {
    top: 0;
    bottom: 0;
    left: 0;
    width: 7px;
    background: var(--alliance-yellow);
}

.contact-card::after {
    right: -155px;
    bottom: -160px;
    z-index: 1;
    width: 280px;
    height: 280px;
    background: var(--alliance-yellow);
    opacity: 0.9;
    transform: rotate(-34deg);
}

.contact-icon,
.contact-content {
    position: relative;
    z-index: 2;
}

.contact-icon {
    display: flex;
    flex: 0 0 68px;
    align-items: center;
    justify-content: center;
    width: 68px;
    height: 68px;
    color: var(--alliance-yellow);
    background: var(--alliance-graphite);
    border-radius: var(--radius-medium);
}

.contact-svg {
    width: 31px;
    height: 31px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.6;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.contact-content {
    min-width: 0;
    max-width: 800px;
}

.contact-content .eyebrow {
    margin-bottom: 5px;
}

.contact-content h1 {
    margin-bottom: 8px;
    color: var(--alliance-graphite);
    font-size: 26px;
    font-weight: 800;
    line-height: 1.2;
    overflow-wrap: anywhere;
}

.contact-content p {
    margin-bottom: 12px;
    color: var(--text-secondary);
}

.contact-email {
    display: inline-block;
    max-width: 100%;
    color: var(--alliance-graphite);
    font-size: 17px;
    font-weight: 800;
    border-bottom: 4px solid var(--alliance-yellow);
    overflow-wrap: anywhere;
    transition: background var(--transition);
}

.contact-email:hover {
    background: var(--alliance-yellow);
}

/* =========================================================
   02. FORMULÁRIO: ESTRUTURA E CAMPOS
   ========================================================= */

.lead-section {
    padding: 60px 0;
    background-color: var(--white);
}

.lead-card {
    padding: 44px;
    background: var(--white);
    border: 1px solid var(--border);
    border-left: 7px solid var(--alliance-yellow);
    border-radius: var(--radius-large);
    box-shadow: var(--shadow-small);
}

.lead-card h2 {
    margin-bottom: 8px;
    color: var(--alliance-graphite);
    font-size: 28px;
    font-weight: 800;
    line-height: 1.2;
}

.lead-subtitle {
    color: var(--text-secondary);
}

.lead-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 22px 20px;
}

.lead-grid .full {
    grid-column: 1 / -1;
}

.lead-form .form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-width: 0;
}

.lead-form .form-group > label {
    color: var(--alliance-graphite);
    font-size: 13px;
    font-weight: 700;
}

.lead-form .form-group.required > label::after {
    content: " *";
    color: var(--danger);
}

.optional-hint {
    color: var(--text-secondary);
    font-weight: 400;
}

.lead-form input[type="text"],
.lead-form input[type="tel"],
.lead-form input[type="email"],
.lead-form select {
    width: 100%;
    height: 52px;
    padding: 0 16px;
    color: var(--text-primary);
    background: var(--white);
    border: 1px solid var(--border-dark);
    border-radius: var(--radius-small);
    font-size: 16px; /* evita zoom automático ao focar no iOS */
    outline: none;
    transition:
        border-color var(--transition),
        box-shadow var(--transition);
}

.lead-form input::placeholder {
    color: var(--text-light);
}

.lead-form input:hover,
.lead-form select:hover {
    border-color: var(--border-hover);
}

.lead-form input:focus,
.lead-form select:focus {
    border-color: var(--alliance-yellow-hover);
    box-shadow: var(--focus-ring);
}

.lead-form select {
    cursor: pointer;
}

.lead-form .is-invalid {
    border-color: var(--danger);
}

.field-error {
    display: block;
    color: var(--danger);
    font-size: 12px;
    font-weight: 600;
}

.field-error:empty {
    display: none;
}

/* =========================================================
   03. PREFERÊNCIAS E CONSENTIMENTOS
   ========================================================= */

.lead-contact-pref {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px 22px;
    margin-top: 28px;
    padding: 2px 4px;
    border-radius: var(--radius-small);
}

.lead-contact-pref.is-invalid {
    outline: 2px solid var(--danger);
    outline-offset: 6px;
}

.lead-group-title {
    color: var(--alliance-graphite);
    font-size: 13px;
    font-weight: 700;
}

.lead-group-title::after {
    content: " *";
    color: var(--danger);
}

.lead-form .check-inline,
.lead-form .check-line {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-primary);
    font-size: 13px;
    cursor: pointer;
}

.lead-form .check-line {
    align-items: flex-start;
    color: var(--text-secondary);
    line-height: 1.5;
}

.lead-form input[type="checkbox"] {
    flex: 0 0 auto;
    width: 18px;
    height: 18px;
    accent-color: var(--alliance-graphite);
    cursor: pointer;
}

.lead-form .check-line input[type="checkbox"] {
    margin-top: 2px;
}

.consent-text {
    min-width: 0;
    overflow-wrap: anywhere;
}

.consent-text a {
    color: var(--alliance-graphite);
    font-weight: 700;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.consent-text a:hover {
    color: var(--alliance-yellow-hover);
}

.lead-consents {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 24px;
}

.lead-note {
    display: block;
    margin-top: 22px;
    color: var(--text-secondary);
}

/* =========================================================
   04. ENVIO, ESTADOS E HONEYPOT
   ========================================================= */

.btn-submit {
    width: 100%;
    min-height: 52px;
    margin-top: 12px;
    padding: 10px 28px;
    color: var(--alliance-graphite);
    background: var(--alliance-yellow);
    border: 0;
    border-radius: var(--radius-small);
    font-size: 14px;
    font-weight: 800;
    transition:
        background var(--transition),
        transform var(--transition),
        box-shadow var(--transition);
}

.btn-submit:hover:not(:disabled) {
    background: var(--alliance-yellow-hover);
    box-shadow: var(--shadow-button);
    transform: translateY(-2px);
}

.btn-submit:active:not(:disabled) {
    transform: translateY(0);
}

.btn-submit:disabled {
    cursor: not-allowed;
    color: var(--disabled-text);
    background: var(--disabled-bg);
}

.lead-submit-hint {
    margin-top: 10px;
    color: var(--text-secondary);
    font-size: 13px;
    text-align: center;
}

.lead-status {
    margin-top: 18px;
    font-weight: 600;
}

.lead-status:empty {
    display: none;
}

.lead-status.success,
.lead-status.error {
    padding: 14px 16px;
    border-radius: var(--radius-small);
}

.lead-status.success {
    color: var(--success);
    background: #eaf6ee;
}

.lead-status.error {
    color: var(--danger);
    background: #fdecec;
}

/*
   Campo antispam deliberadamente fora da tela.
   Não confundir com uma regra sem uso: contact.js lê seu valor.
*/
.hp-field {
    position: absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

/* =========================================================
   05. TABLET
   ========================================================= */

@media (max-width: 900px) {
    .lead-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .lead-card {
        padding: 36px;
    }
}

/* =========================================================
   06. CELULAR
   ========================================================= */

@media (max-width: 700px) {
    .contact-section {
        padding: 36px 0 52px;
    }

    .contact-card {
        align-items: flex-start;
        flex-direction: column;
        gap: 20px;
        padding: 30px;
    }

    .contact-icon {
        flex-basis: 55px;
        width: 55px;
        height: 55px;
    }

    .contact-content h1 {
        font-size: 23px;
    }

    .contact-email {
        font-size: 15px;
    }

    .lead-section {
        padding: 48px 0 52px;
    }

    .lead-card {
        padding: 28px 22px;
    }

    .lead-grid {
        grid-template-columns: minmax(0, 1fr);
        gap: 18px;
    }

    .lead-card h2 {
        font-size: 24px;
    }

    .lead-contact-pref {
        align-items: flex-start;
    }

    .lead-group-title {
        flex-basis: 100%;
    }
}

@media (max-width: 400px) {
    .contact-card {
        padding: 24px 20px;
    }

    .lead-card {
        padding: 24px 18px;
    }

    .lead-form .check-line {
        align-items: flex-start;
    }
}