/*
 * ══════════════════════════════════════════════
 *  CONTACT.CSS — Estilização de Contato (Penúltima Dobra)
 * ══════════════════════════════════════════════
 *  Propósito : Seção de contato glassmorphic com BORDAS RETAS e botão
 *              de partículas (efeito bolhas) do design system.
 *  Dependências : tokens.css (--color-primary, --font-heading, etc.)
 */

.contact-section {
    position: relative;
    width: 100%;
    padding: 120px 0;
    background-color: var(--color-black);
    overflow: hidden;
    border-bottom: 1px solid var(--color-border);
}

/* Grid de Grade Sutil (Identidade Visual CapCode) */
.contact-grid-bg {
    position: absolute;
    inset: 0;
    background-size: 32px 32px;
    background-image:
        linear-gradient(to right, rgba(255, 255, 255, 0.015) 1px, transparent 1px),
        linear-gradient(to bottom, rgba(255, 255, 255, 0.015) 1px, transparent 1px);
    mask-image: radial-gradient(ellipse at center, black 40%, transparent 80%);
    -webkit-mask-image: radial-gradient(ellipse at center, black 40%, transparent 80%);
    pointer-events: none;
    z-index: 1;
}

.contact-container {
    width: 100%;
    max-width: 800px;
    margin: 0 auto;
    padding: 0 24px;
    position: relative;
    z-index: 10;
}

/* ── Cabeçalho Centrado ─────────────────────── */
.contact-header {
    text-align: center;
    margin-bottom: 60px;
}

.contact-subtitle {
    display: block;
    margin-bottom: 16px;
    font-family: var(--font-mono);
    font-size: 0.75rem;
    letter-spacing: 0.25em;
    color: var(--color-primary-light);
    text-transform: uppercase;
}

.contact-title {
    font-family: var(--font-heading);
    font-size: 3.5rem;
    line-height: 1.15;
    font-weight: 500;
    color: var(--color-white);
    letter-spacing: -0.02em;
    margin-bottom: 20px;
}

.contact-desc {
    font-family: var(--font-body);
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.5);
    line-height: 1.6;
    font-weight: 300;
}

/* ── Formulário Glassmorphic Premium com BORDAS RETAS ── */
.contact-form-wrapper {
    position: relative;
    width: 100%;
    background: rgba(10, 10, 10, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 0 !important; /* Bordas 100% Retas */
    padding: 48px;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    box-shadow: 0 30px 60px -20px rgba(0, 0, 0, 0.8),
                inset 0 1px 0 rgba(255, 255, 255, 0.05);
    overflow: hidden;
}

.contact-form-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 28px;
    width: 100%;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 10px;
    position: relative;
}

/* Classes utilitárias do grid */
.col-span-2 {
    grid-column: span 2 / span 2;
}

@media (max-width: 767px) {
    .md\:col-span-1 {
        grid-column: span 2 / span 2;
    }
}

/* Rótulos (Labels) em Mono */
.form-label {
    font-family: var(--font-mono);
    font-size: 0.6875rem;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.4);
    text-transform: uppercase;
    letter-spacing: 0.15em;
    transition: color var(--duration-fast) var(--ease-smooth);
}

/* Input wrappers */
.input-wrapper {
    position: relative;
    width: 100%;
    display: flex;
    align-items: center;
}

/* Estilo Base dos Inputs - Bordas Retas */
.form-input {
    width: 100%;
    background-color: rgba(0, 0, 0, 0.35);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 0 !important; /* Bordas 100% Retas */
    padding: 14px 18px 14px 46px;
    font-family: var(--font-body);
    font-size: 0.9375rem;
    color: var(--color-white);
    outline: none;
    transition: all var(--duration-normal) var(--ease-smooth);
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.4);
}

.form-textarea {
    resize: none;
    padding-top: 14px;
}

/* Placeholders */
.form-input::placeholder {
    color: rgba(255, 255, 255, 0.2);
}

/* Ícones dentro dos inputs */
.input-icon {
    position: absolute;
    left: 16px;
    font-size: 1.15rem;
    color: rgba(255, 255, 255, 0.25);
    transition: color var(--duration-fast) var(--ease-smooth);
    pointer-events: none;
}

.textarea-icon {
    top: 16px;
}

/* Efeitos de Foco (Focus) */
.form-group:focus-within .form-label {
    color: var(--color-primary-light);
}

.form-input:focus {
    border-color: rgba(14, 165, 233, 0.45);
    background-color: rgba(0, 0, 0, 0.55);
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.6),
                0 0 15px rgba(14, 165, 233, 0.2);
}

.form-group:focus-within .input-icon {
    color: var(--color-primary-light);
}


/* ── Custom Select (Dropdown Premium) - Bordas Retas ── */
.custom-select-wrapper {
    position: relative;
    width: 100%;
}

.custom-select-btn {
    width: 100%;
    background-color: rgba(0, 0, 0, 0.35);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 0 !important; /* Bordas 100% Retas */
    padding: 14px 20px;
    font-family: var(--font-body);
    font-size: 0.9375rem;
    color: var(--color-white);
    text-align: left;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    outline: none;
    transition: all var(--duration-normal) var(--ease-smooth);
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.4);
}

.select-arrow {
    font-size: 1.1rem;
    color: rgba(255, 255, 255, 0.3);
    transition: transform var(--duration-normal) var(--ease-smooth),
                color var(--duration-fast) var(--ease-smooth);
}

.select-selected-value {
    color: rgba(255, 255, 255, 0.8);
    transition: color var(--duration-fast);
}

.select-selected-value[data-placeholder] {
    color: rgba(255, 255, 255, 0.2);
}

/* Foco do Select */
.custom-select-wrapper.active .custom-select-btn {
    border-color: rgba(14, 165, 233, 0.45);
    background-color: rgba(0, 0, 0, 0.55);
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.6),
                0 0 15px rgba(14, 165, 233, 0.2);
}

.custom-select-wrapper.active .select-arrow {
    transform: rotate(180deg);
    color: var(--color-primary-light);
}

/* Lista de Opções - Bordas Retas */
.custom-select-options {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    width: 100%;
    background: rgba(17, 17, 17, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 0 !important; /* Bordas 100% Retas */
    padding: 8px;
    z-index: 100;
    display: none;
    flex-direction: column;
    gap: 4px;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.6),
                inset 0 1px 0 rgba(255, 255, 255, 0.05);
    transform: translateY(10px);
    opacity: 0;
    transition: transform 0.3s var(--ease-smooth),
                opacity 0.3s var(--ease-smooth);
}

.custom-select-wrapper.active .custom-select-options {
    display: flex;
    transform: translateY(0);
    opacity: 1;
}

/* Item de Opção - Bordas Retas */
.custom-option {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    border-radius: 0 !important; /* Bordas 100% Retas */
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.875rem;
    font-family: var(--font-body);
    cursor: pointer;
    transition: all var(--duration-fast) var(--ease-smooth);
}

.option-icon {
    font-size: 1.15rem;
    color: rgba(255, 255, 255, 0.3);
    transition: color var(--duration-fast);
}

.custom-option:hover {
    background-color: rgba(14, 165, 233, 0.15);
    color: var(--color-white);
}

.custom-option:hover .option-icon {
    color: var(--color-primary-light);
}

.custom-option.selected {
    background-color: var(--color-primary);
    color: var(--color-white);
}

.custom-option.selected .option-icon {
    color: var(--color-white);
}


/* ── Botão com Efeito de Partículas / Bolhas (Design System) ── */
.form-submit-container {
    width: 100%;
    margin-top: 12px;
}

.btn-submit-contact {
    width: 100%;
    height: 52px;
}

/* Estilo do Botão de Partículas (SoraStudio Specs) - Bordas Retas */
.btn-particle {
    cursor: pointer;
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    transition: all 0.25s ease;
    background: radial-gradient(65.28% 65.28% at 50% 100%, rgba(56, 189, 248, 0.8) 0%, rgba(56, 189, 248, 0) 100%), 
                linear-gradient(0deg, #0284c7, #0284c7);
    border-radius: 0 !important; /* Bordas 100% Retas */
    border: none;
    box-shadow: 0 0 20px rgba(56, 189, 248, 0.2);
}

.btn-particle:hover {
    box-shadow: 0 0 30px rgba(56, 189, 248, 0.45);
    transform: translateY(-2px);
}

.btn-particle:active {
    transform: translateY(0);
}

/* Pseudo elementos brilhantes do botão - Ajustados para Bordas Retas */
.btn-particle::before {
    content: "";
    position: absolute;
    inset: 1px;
    background: linear-gradient(177.95deg, rgba(255, 255, 255, 0.3) 0%, rgba(255, 255, 255, 0) 100%);
    border-radius: 0 !important; /* Bordas 100% Retas */
    transition: all 0.5s ease-in-out;
    z-index: 0;
}

.btn-particle::after {
    content: "";
    position: absolute;
    inset: 2px;
    background: radial-gradient(65.28% 65.28% at 50% 100%, rgba(56, 189, 248, 0.8) 0%, rgba(56, 189, 248, 0) 100%), 
                linear-gradient(0deg, #0284c7, #0284c7);
    border-radius: 0 !important; /* Bordas 100% Retas */
    transition: all 0.5s ease-in-out;
    z-index: 0;
}

/* Conteúdo do Botão de Partículas */
.btn-particle .inner {
    z-index: 2;
    gap: 10px;
    position: relative;
    width: 100%;
    color: var(--color-white);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-mono);
    font-size: 0.875rem;
    font-weight: 600;
    letter-spacing: 0.15em;
}

.btn-particle:hover .inner iconify-icon {
    transform: translateX(4px);
}

.btn-particle .inner iconify-icon {
    transition: transform var(--duration-normal) var(--ease-smooth);
}

/* Wrapper das Bolhas Flutuantes */
.points_wrapper {
    overflow: hidden;
    width: 100%;
    height: 100%;
    pointer-events: none;
    position: absolute;
    z-index: 1;
    top: 0;
    left: 0;
}

.points_wrapper .point {
    bottom: -10px;
    position: absolute;
    animation: floating-points infinite ease-in-out;
    pointer-events: none;
    width: 2px;
    height: 2px;
    background-color: var(--color-white);
    border-radius: 50%;
}

@keyframes floating-points {
    0% { transform: translateY(0); opacity: 0; }
    10% { opacity: 0.8; }
    85% { opacity: 0; }
    100% { transform: translateY(-55px); opacity: 0; }
}

/* Pontos e tempos individuais das bolhas no hover do botão */
.btn-particle:hover .point {
    animation-play-state: running;
}

/* Estado estático padrão (pausado, só flutua no hover) */
.point {
    animation-play-state: paused;
}

.points_wrapper .point:nth-child(1) { left: 10%; opacity: 1; animation-duration: 2.35s; animation-delay: 0.2s; }
.points_wrapper .point:nth-child(2) { left: 30%; opacity: 0.7; animation-duration: 2.5s; animation-delay: 0.5s; }
.points_wrapper .point:nth-child(3) { left: 25%; opacity: 0.8; animation-duration: 2.2s; animation-delay: 0.1s; }
.points_wrapper .point:nth-child(4) { left: 44%; opacity: 0.6; animation-duration: 2.05s; }
.points_wrapper .point:nth-child(5) { left: 50%; opacity: 1; animation-duration: 1.9s; }
.points_wrapper .point:nth-child(6) { left: 75%; opacity: 0.5; animation-duration: 1.5s; animation-delay: 1.5s; }
.points_wrapper .point:nth-child(7) { left: 88%; opacity: 0.9; animation-duration: 2.2s; animation-delay: 0.2s; }


/* ── Estados de Erro (Validation) - Retas ────── */
.form-group.has-error .form-input,
.form-group.has-error .custom-select-btn {
    border-color: rgba(239, 68, 68, 0.5);
    background-color: rgba(239, 68, 68, 0.05);
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.4),
                0 0 10px rgba(239, 68, 68, 0.15);
}

.form-group.has-error .form-label {
    color: var(--color-error);
}

.form-group.has-error .input-icon {
    color: var(--color-error);
}

.error-message {
    display: none;
    font-family: var(--font-mono);
    font-size: 0.65rem;
    color: var(--color-error);
    letter-spacing: 0.05em;
    margin-top: 4px;
    animation: slideDownErr 0.3s var(--ease-smooth) forwards;
}

.form-group.has-error .error-message {
    display: block;
}

@keyframes slideDownErr {
    0% { transform: translateY(-4px); opacity: 0; }
    100% { transform: translateY(0); opacity: 1; }
}


/* ── Painel de Sucesso Glassmorphic - Retas ──── */
.contact-success-panel {
    position: absolute;
    inset: 0;
    background: rgba(10, 10, 10, 0.95);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border-radius: 0 !important; /* Bordas 100% Retas */
    z-index: 200;
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 40px;
    animation: fadeInPanel 0.5s var(--ease-smooth) forwards;
}

@keyframes fadeInPanel {
    0% { opacity: 0; transform: scale(0.98); }
    100% { opacity: 1; transform: scale(1); }
}

.success-glow {
    position: absolute;
    width: 250px;
    height: 250px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(16, 185, 129, 0.12) 0%, transparent 70%);
    filter: blur(25px);
    top: 25%;
}

.success-icon-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 24px;
}

.success-icon {
    font-size: 4.5rem;
    color: var(--color-success);
    z-index: 2;
    filter: drop-shadow(0 0 10px rgba(16, 185, 129, 0.3));
}

.success-circle-pulse {
    position: absolute;
    width: 90px;
    height: 90px;
    border-radius: 50%;
    border: 1px solid rgba(16, 185, 129, 0.3);
    animation: pulseCircleSuccess 2s infinite ease-out;
}

@keyframes pulseCircleSuccess {
    0% { transform: scale(0.8); opacity: 0.8; }
    100% { transform: scale(1.6); opacity: 0; }
}

.success-title {
    font-family: var(--font-heading);
    font-size: 2rem;
    font-weight: 600;
    color: var(--color-white);
    margin-bottom: 16px;
    letter-spacing: -0.01em;
}

.success-desc {
    font-family: var(--font-body);
    font-size: 0.9375rem;
    color: rgba(255, 255, 255, 0.6);
    line-height: 1.6;
    max-width: 440px;
    margin-bottom: 32px;
}

#btn-success-reset {
    max-width: 280px;
}


/* ── Responsividade Completa ────────────────── */
@media (max-width: 991px) {
    .contact-section {
        padding: 80px 0;
    }
    
    .contact-title {
        font-size: 2.8rem;
    }
    
    .contact-form-wrapper {
        padding: 36px;
    }
}

@media (max-width: 575px) {
    .contact-title {
        font-size: 2.2rem;
    }
    
    .contact-form-wrapper {
        padding: 24px 16px;
    }
    
    .contact-form-grid {
        gap: 20px;
    }
    
    .form-input {
        padding: 12px 14px 12px 38px;
        font-size: 0.875rem;
    }
    
    .input-icon {
        left: 12px;
        font-size: 1rem;
    }
    
    .custom-select-btn {
        padding: 12px 16px;
        font-size: 0.875rem;
    }
    
    .success-title {
        font-size: 1.6rem;
    }
    
    .success-desc {
        font-size: 0.875rem;
    }
}
