/* ============================================
   TEAR DE LUZ — Premium Form Stylesheet
   ============================================ */

:root {
    --color-primary: #1e3a8a;
    --color-primary-light: #2c4ba3;
    --color-primary-dark: #172554;
    --color-accent: #d4af37;
    --color-accent-light: #f4cf57;
    --color-bg: #fafaf7;
    --color-card: #ffffff;
    --color-text: #1f2937;
    --color-text-light: #6b7280;
    --color-border: #e5e7eb;
    --color-success: #16a34a;
    --color-error: #dc2626;
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 12px 32px rgba(0, 0, 0, 0.10);
    --shadow-xl: 0 24px 48px rgba(0, 0, 0, 0.12);
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--color-bg);
    color: var(--color-text);
    margin: 0;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.font-display {
    font-family: 'Playfair Display', Georgia, serif;
}

/* ============================================
   HERO BANNER
   ============================================ */

.hero-banner {
    background:
        radial-gradient(ellipse at top left, rgba(212, 175, 55, 0.15), transparent 50%),
        radial-gradient(ellipse at bottom right, rgba(100, 150, 255, 0.25), transparent 50%),
        linear-gradient(135deg, #1e3a8a 0%, #2c4ba3 50%, #3a4a8c 100%);
    min-height: 480px;
    height: 50vh;
    max-height: 600px;
}

.hero-emblem {
    font-size: 3rem;
    color: var(--color-accent);
    text-shadow: 0 0 30px rgba(212, 175, 55, 0.6);
    margin-bottom: 1rem;
    letter-spacing: 0.5em;
    animation: glow 3s ease-in-out infinite;
}

@keyframes glow {
    0%, 100% { text-shadow: 0 0 30px rgba(212, 175, 55, 0.6); }
    50% { text-shadow: 0 0 50px rgba(212, 175, 55, 0.9); }
}

.hero-divider {
    width: 80px;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--color-accent), transparent);
    margin: 0 auto;
}

.blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.4;
}
.blob-1 {
    width: 400px; height: 400px;
    background: var(--color-accent-light);
    top: -100px; left: -100px;
}
.blob-2 {
    width: 500px; height: 500px;
    background: #6699ff;
    bottom: -150px; right: -150px;
}
.blob-3 {
    width: 300px; height: 300px;
    background: var(--color-accent);
    top: 50%; left: 60%;
    transform: translate(-50%, -50%);
}

/* ============================================
   INTRO CARD
   ============================================ */

.intro-card {
    background: white;
    border-radius: var(--radius-xl);
    padding: 2rem;
    box-shadow: var(--shadow-md);
    border-left: 4px solid var(--color-accent);
}

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

.form-section {
    background: var(--color-card);
    border-radius: var(--radius-xl);
    padding: 2.5rem;
    box-shadow: var(--shadow-lg);
    animation: fadeInUp 0.6s ease-out;
    border: 1px solid rgba(0, 0, 0, 0.04);
}

.form-section-warning {
    border-left: 4px solid #f59e0b;
}

.form-section-final {
    background: linear-gradient(180deg, #ffffff 0%, #f0f4ff 100%);
}

.section-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding-bottom: 1.5rem;
    margin-bottom: 2rem;
    border-bottom: 1px solid var(--color-border);
}

.section-icon {
    font-size: 2.5rem;
    width: 64px;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #f0f4ff, #e0e7ff);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
}

.section-title {
    font-family: 'Playfair Display', serif;
    font-size: 1.875rem;
    font-weight: 600;
    color: var(--color-primary);
    margin: 0;
    line-height: 1.2;
}

.section-subtitle {
    font-size: 0.875rem;
    color: var(--color-text-light);
    margin: 0.25rem 0 0 0;
}

/* ============================================
   FORM CONTROLS
   ============================================ */

.form-label {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    color: #374151;
    margin-bottom: 0.5rem;
}

.form-input {
    width: 100%;
    padding: 0.875rem 1.125rem;
    border: 1.5px solid var(--color-border);
    border-radius: var(--radius-md);
    font-size: 1rem;
    font-family: inherit;
    background-color: #fafafa;
    transition: all 0.2s ease;
    color: var(--color-text);
}

.form-input:hover {
    border-color: #d1d5db;
    background-color: #fff;
}

.form-input:focus {
    outline: none;
    border-color: var(--color-primary);
    background-color: #fff;
    box-shadow: 0 0 0 4px rgba(30, 58, 138, 0.12);
}

textarea.form-input {
    line-height: 1.6;
}

input[type="date"].form-input {
    color: var(--color-text);
}

/* ============================================
   RADIO CARDS
   ============================================ */

.radio-group {
    display: flex;
    gap: 1rem;
}

.radio-card {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    padding: 1.25rem 1.5rem;
    border: 2px solid var(--color-border);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all 0.2s ease;
    background-color: #fafafa;
    font-weight: 500;
    user-select: none;
}

.radio-card:hover {
    border-color: var(--color-primary);
    background-color: #fff;
    transform: translateY(-1px);
    box-shadow: var(--shadow-sm);
}

.radio-card:has(input:checked) {
    border-color: var(--color-primary);
    background-color: #eff6ff;
    box-shadow: 0 0 0 3px rgba(30, 58, 138, 0.15);
}

.radio-card input[type="radio"] {
    width: 1.25rem;
    height: 1.25rem;
    accent-color: var(--color-primary);
    cursor: pointer;
}

.radio-card input:checked + span {
    color: var(--color-primary);
    font-weight: 600;
}

/* ============================================
   CHECKBOX CARDS
   ============================================ */

.checkbox-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 0.75rem;
}

.checkbox-card {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 1.25rem;
    border: 1.5px solid var(--color-border);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all 0.2s ease;
    background-color: #fafafa;
    user-select: none;
}

.checkbox-card:hover {
    border-color: var(--color-primary);
    background-color: #fff;
}

.checkbox-card:has(input:checked) {
    border-color: var(--color-primary);
    background-color: #eff6ff;
    box-shadow: 0 0 0 3px rgba(30, 58, 138, 0.10);
}

.checkbox-card input[type="checkbox"] {
    width: 1.125rem;
    height: 1.125rem;
    accent-color: var(--color-primary);
    cursor: pointer;
    flex-shrink: 0;
}

.checkbox-card input:checked ~ span {
    color: var(--color-primary);
    font-weight: 500;
}

/* ============================================
   DECLARATION
   ============================================ */

.declaration-box {
    background: #f9fafb;
    border: 1px solid var(--color-border);
    border-left: 4px solid var(--color-accent);
    border-radius: var(--radius-md);
    padding: 1.5rem;
    max-height: 400px;
    overflow-y: auto;
    font-size: 0.9rem;
    line-height: 1.7;
    color: #374151;
}

.declaration-box p {
    margin-bottom: 0.75rem;
}

.declaration-box::-webkit-scrollbar {
    width: 8px;
}
.declaration-box::-webkit-scrollbar-track {
    background: #f3f4f6;
    border-radius: 4px;
}
.declaration-box::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 4px;
}
.declaration-box::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

/* ============================================
   SIGNATURE
   ============================================ */

.signature-wrapper {
    border: 2px dashed #cbd5e1;
    border-radius: var(--radius-md);
    background-color: #fff;
    transition: all 0.2s ease;
}

.signature-wrapper:hover {
    border-color: var(--color-primary);
}

.signature-canvas {
    width: 100%;
    height: 200px;
    touch-action: none;
    cursor: crosshair;
    display: block;
    border-radius: var(--radius-md);
}

.signature-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 0.75rem;
}

.text-btn {
    background: none;
    border: none;
    color: var(--color-text-light);
    font-size: 0.875rem;
    cursor: pointer;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    transition: all 0.15s;
}

.text-btn:hover {
    color: var(--color-error);
    background-color: #fef2f2;
}

/* ============================================
   UPLOAD ZONES
   ============================================ */

.upload-zone {
    position: relative;
    border: 2px dashed #d1d5db;
    border-radius: var(--radius-md);
    padding: 2rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s ease;
    background-color: #fafafa;
    min-height: 200px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.upload-zone:hover {
    border-color: var(--color-primary);
    background-color: #f0f4ff;
}

.upload-zone.dragging {
    border-color: var(--color-accent);
    background-color: #fef3c7;
}

.upload-zone.has-file {
    border-style: solid;
    border-color: var(--color-primary);
    background-color: #fff;
}

.upload-zone img {
    max-height: 240px;
    max-width: 100%;
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-sm);
}

.upload-preview {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
    width: 100%;
}

.upload-filename {
    font-size: 0.9rem;
    color: var(--color-text);
    font-weight: 500;
    word-break: break-all;
    text-align: center;
}

.upload-icon-large {
    font-size: 4rem;
    line-height: 1;
}

.text-btn {
    background: transparent;
    border: 1px solid var(--color-border);
    color: var(--color-text-light);
    padding: 0.5rem 1rem;
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-size: 0.875rem;
    transition: all 0.2s ease;
}

.text-btn:hover {
    border-color: var(--color-error);
    color: var(--color-error);
    background-color: #fef2f2;
}

.upload-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}

.upload-icon {
    font-size: 3rem;
    opacity: 0.7;
}

.upload-text {
    font-size: 0.95rem;
    color: var(--color-text-light);
    margin: 0;
}

.upload-hint {
    font-size: 0.75rem;
    color: #9ca3af;
    margin: 0;
}

/* ============================================
   CONSENT (final accept)
   ============================================ */

.consent-card {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 1.5rem;
    background: white;
    border: 2px solid var(--color-border);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all 0.2s ease;
    max-width: 800px;
    margin: 0 auto;
}

.consent-card:hover {
    border-color: var(--color-primary);
}

.consent-card:has(input:checked) {
    border-color: var(--color-success);
    background-color: #f0fdf4;
}

.consent-checkbox {
    width: 1.5rem;
    height: 1.5rem;
    accent-color: var(--color-success);
    cursor: pointer;
    flex-shrink: 0;
    margin-top: 0.125rem;
}

.consent-text {
    font-size: 0.95rem;
    line-height: 1.6;
    color: #374151;
}

/* ============================================
   SUBMIT BUTTON
   ============================================ */

.submit-btn {
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-light) 100%);
    color: white;
    font-weight: 600;
    font-size: 1.125rem;
    padding: 1.125rem 3rem;
    border: none;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 8px 24px rgba(30, 58, 138, 0.3);
    position: relative;
    overflow: hidden;
    font-family: inherit;
}

.submit-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 12px 32px rgba(30, 58, 138, 0.4);
}

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

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

.submit-btn::after {
    content: '';
    position: absolute;
    top: 0; left: -100%;
    width: 100%; height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.submit-btn:hover::after {
    left: 100%;
}

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

.site-footer {
    background: linear-gradient(135deg, var(--color-primary-dark), var(--color-primary));
    color: #cbd5e1;
    padding: 4rem 0 3rem;
    margin-top: 6rem;
}

.footer-emblem {
    font-size: 2rem;
    color: var(--color-accent);
    margin-bottom: 1rem;
    letter-spacing: 0.3em;
}

.footer-title {
    font-family: 'Playfair Display', serif;
    font-size: 1.5rem;
    color: white;
    margin: 0.5rem 0;
    font-weight: 500;
}

.footer-subtitle {
    font-size: 0.875rem;
    color: var(--color-accent);
    margin: 0;
    font-style: italic;
}

.footer-copy {
    font-size: 0.75rem;
    color: #94a3b8;
}

/* ============================================
   SUCCESS OVERLAY
   ============================================ */

.success-overlay {
    background: linear-gradient(135deg, rgba(30, 58, 138, 0.95), rgba(58, 74, 140, 0.95));
    backdrop-filter: blur(8px);
}

.success-icon {
    font-size: 5rem;
    margin-bottom: 1rem;
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

/* ============================================
   ANIMATIONS
   ============================================ */

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

.form-section:nth-child(2) { animation-delay: 0.1s; }
.form-section:nth-child(3) { animation-delay: 0.2s; }
.form-section:nth-child(4) { animation-delay: 0.3s; }
.form-section:nth-child(5) { animation-delay: 0.4s; }
.form-section:nth-child(6) { animation-delay: 0.5s; }
.form-section:nth-child(7) { animation-delay: 0.6s; }
.form-section:nth-child(8) { animation-delay: 0.7s; }

/* ============================================
   RESPONSIVE
   ============================================ */

@media (max-width: 768px) {
    .hero-banner {
        min-height: 400px;
        height: 60vh;
    }

    .form-section {
        padding: 1.5rem;
    }

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

    .section-icon {
        width: 48px;
        height: 48px;
        font-size: 1.75rem;
    }

    .radio-group {
        flex-direction: column;
    }

    .checkbox-grid {
        grid-template-columns: 1fr;
    }

    .submit-btn {
        width: 100%;
        padding: 1rem 2rem;
    }
}