/* ===========================
   RESET E VARIÁVEIS GLOBAIS
   =========================== */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* Cores - Identidade KM Solutions */
    --primary-red: #E63946;
    --dark-gray: #2D3436;
    --light-gray: #F5F5F5;
    --border-gray: #E8E8E8;
    --text-muted: #757575;
    --success-green: #10B981;
    
    /* Tipografia */
    --font-primary: 'Roboto', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-secondary: 'Barlow', sans-serif;
    
    /* Espaçamento */
    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 1.5rem;
    --spacing-lg: 2rem;
    --spacing-xl: 3rem;
    --spacing-2xl: 4rem;
    
    /* Sombras */
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.1);
    
    /* Transições */
    --transition-fast: 150ms ease-in-out;
    --transition-normal: 300ms ease-in-out;
}

/* ===========================
   TIPOGRAFIA BASE
   =========================== */

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-primary);
    color: var(--dark-gray);
    background-color: #ffffff;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-secondary);
    font-weight: 700;
    line-height: 1.2;
}

p {
    margin-bottom: var(--spacing-sm);
}

/* ===========================
   LAYOUT GERAL
   =========================== */

.page-wrapper {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.container {
    max-width: 900px;
    margin: 0 auto;
    padding: 0 var(--spacing-md);
    width: 100%;
}

/* ===========================
   HEADER
   =========================== */

.header {
    background-color: #ffffff;
    border-bottom: 1px solid var(--border-gray);
    padding: var(--spacing-md) 0;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: var(--shadow-sm);
}

.header-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--spacing-md);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
    font-weight: 700;
}

.logo-text {
    font-size: 1.25rem;
    color: var(--dark-gray);
    font-family: var(--font-secondary);
}

.logo-name {
    font-size: 1.25rem;
    color: var(--dark-gray);
    font-family: var(--font-secondary);
    letter-spacing: 0.05em;
}



/* ===========================
   HERO SECTION
   =========================== */

.hero-section {
    flex: 1;
    background: linear-gradient(135deg, #f8f9fa 0%, #f0f0f0 100%);
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--spacing-2xl) var(--spacing-md);
}

.hero-background {
    position: absolute;
    top: 0;
    right: -100px;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(230, 57, 70, 0.05) 0%, transparent 70%);
    border-radius: 50%;
    z-index: 0;
}

.hero-section::before {
    content: '';
    position: absolute;
    bottom: -50px;
    left: 0;
    width: 100%;
    height: 150px;
    background: linear-gradient(to right, transparent, rgba(230, 57, 70, 0.03), transparent);
    clip-path: polygon(0 50%, 100% 0, 100% 100%, 0 100%);
}

/* ===========================
   FORM WRAPPER E CARD
   =========================== */

.form-wrapper {
    position: relative;
    z-index: 1;
    width: 100%;
}

.form-card {
    background-color: #ffffff;
    border-radius: 12px;
    box-shadow: var(--shadow-lg);
    padding: var(--spacing-2xl);
    max-width: 600px;
    margin: 0 auto;
    animation: slideUp 0.6s ease-out;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ===========================
   FORM HEADER
   =========================== */

.form-header {
    text-align: center;
    margin-bottom: var(--spacing-2xl);
}

.form-icon {
    display: flex;
    justify-content: center;
    margin-bottom: var(--spacing-md);
    animation: float 3s ease-in-out infinite;
}

@keyframes float {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-10px);
    }
}

.form-title {
    font-size: 1.75rem;
    color: var(--dark-gray);
    margin-bottom: var(--spacing-sm);
    font-weight: 700;
}

.form-title::before {
    content: '';
    display: inline-block;
    width: 4px;
    height: 1.75rem;
    background-color: var(--primary-red);
    margin-right: var(--spacing-sm);
    vertical-align: middle;
    border-radius: 2px;
}

.form-subtitle {
    font-size: 1rem;
    color: var(--text-muted);
    line-height: 1.6;
}

/* ===========================
   FORM SECTIONS
   =========================== */

.form-content {
    display: flex;
    flex-direction: column;
}

.form-section {
    border: none;
    padding: 0;
    margin-bottom: var(--spacing-lg);
}

.form-section:last-of-type {
    margin-bottom: var(--spacing-lg);
}

/* ===========================
   FORM FIELDS
   =========================== */

.form-group {
    margin-bottom: var(--spacing-md);
}

.form-label {
    display: block;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--dark-gray);
    margin-bottom: var(--spacing-xs);
}

.optional-label {
    font-weight: 400;
    color: var(--text-muted);
    font-size: 0.85rem;
}

.form-input {
    width: 100%;
    padding: var(--spacing-sm) var(--spacing-md);
    border: 1px solid var(--border-gray);
    border-radius: 6px;
    font-family: var(--font-primary);
    font-size: 0.95rem;
    color: var(--dark-gray);
    transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
    background-color: #fafafa;
}

.form-input:focus {
    outline: none;
    border-color: var(--primary-red);
    box-shadow: 0 0 0 3px rgba(230, 57, 70, 0.1);
    background-color: #ffffff;
}

.form-input::placeholder {
    color: #bbb;
}

.form-help-text {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-top: var(--spacing-sm);
    line-height: 1.5;
}

/* ===========================
   RADIO BUTTONS
   =========================== */

.form-question {
    font-size: 1rem;
    font-weight: 600;
    color: var(--dark-gray);
    margin-bottom: var(--spacing-md);
    display: block;
}

.radio-group {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-md);
}

.radio-item {
    display: flex;
    align-items: flex-start;
    gap: var(--spacing-md);
    cursor: pointer;
    padding: var(--spacing-sm);
    border-radius: 6px;
    transition: background-color var(--transition-fast);
}

.radio-item:hover {
    background-color: #f9f9f9;
}

.radio-item input[type="radio"] {
    appearance: none;
    -webkit-appearance: none;
    width: 20px;
    height: 20px;
    border: 2px solid var(--border-gray);
    border-radius: 50%;
    cursor: pointer;
    flex-shrink: 0;
    margin-top: 2px;
    transition: all var(--transition-fast);
    background-color: #ffffff;
}

.radio-item input[type="radio"]:hover {
    border-color: var(--primary-red);
}

.radio-item input[type="radio"]:checked {
    border-color: var(--primary-red);
    background: linear-gradient(135deg, var(--primary-red) 0%, #d62828 100%);
    box-shadow: 0 0 0 3px rgba(230, 57, 70, 0.1);
}

.radio-item input[type="radio"]:checked::after {
    content: '✓';
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 0.75rem;
    font-weight: bold;
}

.radio-label {
    font-size: 0.95rem;
    color: var(--dark-gray);
    cursor: pointer;
    line-height: 1.5;
    flex: 1;
}

.radio-item input[type="radio"]:checked + .radio-label {
    color: var(--primary-red);
    font-weight: 600;
}

/* ===========================
   DIVISOR
   =========================== */

.form-divider {
    height: 1px;
    background-color: var(--border-gray);
    margin: var(--spacing-lg) 0;
}

/* ===========================
   BOTÕES
   =========================== */

.form-actions {
    margin: var(--spacing-xl) 0 var(--spacing-lg) 0;
}

.btn-submit {
    width: 100%;
    padding: var(--spacing-md) var(--spacing-lg);
    background: linear-gradient(135deg, var(--primary-red) 0%, #d62828 100%);
    color: #ffffff;
    border: none;
    border-radius: 6px;
    font-size: 1rem;
    font-weight: 700;
    font-family: var(--font-primary);
    cursor: pointer;
    transition: all var(--transition-normal);
    box-shadow: 0 4px 12px rgba(230, 57, 70, 0.3);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.btn-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(230, 57, 70, 0.4);
}

.btn-submit:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(230, 57, 70, 0.3);
}

.btn-submit:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.btn-reset {
    padding: var(--spacing-sm) var(--spacing-lg);
    background-color: var(--primary-red);
    color: #ffffff;
    border: none;
    border-radius: 6px;
    font-size: 0.95rem;
    font-weight: 600;
    font-family: var(--font-primary);
    cursor: pointer;
    transition: all var(--transition-fast);
    margin-top: var(--spacing-md);
}

.btn-reset:hover {
    background-color: #d62828;
}

/* ===========================
   MENSAGEM DE PRIVACIDADE
   =========================== */

.form-privacy-text {
    font-size: 0.8rem;
    color: var(--text-muted);
    text-align: center;
    line-height: 1.5;
    margin-top: var(--spacing-md);
}

/* ===========================
   MENSAGEM DE SUCESSO
   =========================== */

.success-message {
    text-align: center;
    animation: fadeIn 0.5s ease-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.success-icon {
    display: flex;
    justify-content: center;
    margin-bottom: var(--spacing-lg);
    animation: scaleIn 0.5s ease-out;
}

@keyframes scaleIn {
    from {
        transform: scale(0.5);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

.success-title {
    font-size: 1.75rem;
    color: var(--success-green);
    margin-bottom: var(--spacing-md);
}

.success-text {
    font-size: 0.95rem;
    color: var(--text-muted);
    line-height: 1.6;
    margin-bottom: var(--spacing-md);
}

/* ===========================
   FOOTER
   =========================== */

.footer {
    background-color: var(--dark-gray);
    color: #ffffff;
    padding: var(--spacing-lg) var(--spacing-md);
    text-align: center;
    margin-top: auto;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
}

.footer-content p {
    margin-bottom: 0;
    font-size: 0.9rem;
    opacity: 0.8;
}

/* ===========================
   RESPONSIVIDADE
   =========================== */

@media (max-width: 768px) {
    .header-content {
        flex-direction: column;
        gap: var(--spacing-md);
    }

    .nav {
        gap: var(--spacing-md);
    }

    .form-card {
        padding: var(--spacing-lg);
    }

    .form-title {
        font-size: 1.5rem;
    }

    .form-title::before {
        display: block;
        width: 100%;
        height: 4px;
        margin-right: 0;
        margin-bottom: var(--spacing-sm);
    }

    .form-subtitle {
        font-size: 0.95rem;
    }

    .hero-section {
        padding: var(--spacing-lg) var(--spacing-md);
    }

    .hero-background {
        width: 300px;
        height: 300px;
        right: -50px;
    }
}

@media (max-width: 480px) {
    :root {
        font-size: 14px;
    }

    .form-card {
        padding: var(--spacing-md);
        border-radius: 8px;
    }

    .form-title {
        font-size: 1.25rem;
    }

    .form-header {
        margin-bottom: var(--spacing-lg);
    }

    .form-icon svg {
        width: 24px;
        height: 24px;
    }

    .radio-item {
        padding: var(--spacing-xs);
    }

    .btn-submit {
        padding: var(--spacing-md) var(--spacing-md);
        font-size: 0.95rem;
    }

    .hero-section {
        padding: var(--spacing-lg) var(--spacing-sm);
    }
}

/* ===========================
   IMPRESSÃO
   =========================== */

@media print {
    .header,
    .footer,
    .form-actions {
        display: none;
    }

    .form-card {
        box-shadow: none;
        border: 1px solid var(--border-gray);
    }
}
