@import url('https://fonts.googleapis.com/css2?family=Cinzel:wght@400;600;700;900&family=Inter:wght@300;400;500;600;700&family=Outfit:wght@400;600;700;900&display=swap');

:root {
    --bg-main: #0A0A0A;
    --bg-card: rgba(14, 16, 28, 0.75);
    --primary: #C17A3A;
    --primary-glow: rgba(193, 122, 58, 0.35);
    --secondary: #D4AF37;
    --accent: #D4AF37;
    --gold: #D4AF37;
    --copper: #C17A3A;
    --text-main: #F8FAFC;
    --text-muted: #94A3B8;
    --border: rgba(193, 122, 58, 0.25);
    --success: #10B981;
    --warning: #F59E0B;
    --danger: #EF4444;
}

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

body {
    font-family: 'Inter', sans-serif;
    background: linear-gradient(160deg, #0A0A0A 0%, #0B1120 100%);
    color: var(--text-main);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow-x: hidden;
    position: relative;
    padding: 20px;
}

/* Background Animated Blobs */
.bg-blobs {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
}

.blob {
    position: absolute;
    filter: blur(100px);
    opacity: 0.4;
    animation: float 10s infinite ease-in-out alternate;
}

.blob-1 {
    top: -10%;
    left: -10%;
    width: 50vw;
    height: 50vw;
    background: radial-gradient(circle, var(--secondary), transparent 70%);
}

.blob-2 {
    bottom: -10%;
    right: -10%;
    width: 40vw;
    height: 40vw;
    background: radial-gradient(circle, var(--primary), transparent 70%);
    animation-delay: -5s;
}

@keyframes float {
    0% { transform: translate(0, 0) scale(1); }
    100% { transform: translate(5%, 10%) scale(1.1); }
}

/* Main Container */
.app-container {
    width: 100%;
    max-width: 800px;
    position: relative;
    z-index: 10;
}

/* Glassmorphism Cards */
.glass-panel {
    background: var(--bg-card);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 40px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    transition: all 0.4s ease;
    animation: fadeIn 0.6s ease-out;
}

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

/* Headers */
h1, h2, h3 {
    font-family: 'Outfit', sans-serif;
}

.header-text {
    text-align: center;
    margin-bottom: 40px;
}

.headline {
    font-family: 'Cinzel', serif;
    font-size: 32px;
    font-weight: 700;
    background: linear-gradient(135deg, #FFFFFF 0%, #D4AF37 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 10px;
    line-height: 1.3;
    letter-spacing: 0.5px;
}

.subheadline {
    font-size: 16px;
    color: var(--text-muted);
    font-weight: 400;
    max-width: 600px;
    margin: 0 auto;
}

/* Form Groups */
.section-title {
    font-size: 20px;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 20px;
    border-bottom: 1px solid var(--border);
    padding-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.grid-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-bottom: 40px;
}

.input-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.input-group label {
    font-size: 13px;
    font-weight: 600;
    color: #cbd5e1;
}

input[type="number"], input[type="text"], input[type="email"] {
    background: rgba(0,0,0,0.2);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 12px 16px;
    color: white;
    font-family: 'Inter', sans-serif;
    font-size: 15px;
    transition: all 0.3s ease;
}

input[type="number"]:focus, input[type="text"]:focus, input[type="email"]:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 15px var(--primary-glow);
    background: rgba(0,0,0,0.4);
}

/* Questions */
.question-block {
    margin-bottom: 30px;
    background: rgba(255,255,255,0.02);
    border-radius: 12px;
    padding: 20px;
    border: 1px solid transparent;
    transition: border-color 0.3s;
}

.question-block:hover {
    border-color: rgba(193, 122, 58, 0.3);
}

.q-text {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 15px;
    color: #e2e8f0;
}

.options {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.option-label {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    cursor: pointer;
    padding: 12px 15px;
    border-radius: 8px;
    background: rgba(0,0,0,0.2);
    border: 1px solid var(--border);
    transition: all 0.2s ease;
}

.option-label:hover {
    background: rgba(255,255,255,0.05);
    transform: translateX(5px);
}

.option-label input[type="radio"] {
    margin-top: 3px;
    accent-color: var(--primary);
}

.option-label span {
    font-size: 14px;
    color: #cbd5e1;
    line-height: 1.4;
}

.option-label:has(input:checked) {
    border-color: var(--primary);
    background: rgba(193, 122, 58, 0.08);
    box-shadow: inset 0 0 10px rgba(193, 122, 58, 0.15);
}

.option-label:has(input:checked) span {
    color: white;
    font-weight: 500;
}

/* Buttons */
.btn-submit {
    display: block;
    width: 100%;
    padding: 18px;
    border: none;
    border-radius: 10px;
    background: linear-gradient(135deg, #B8860B, #D4AF37);
    color: #000;
    font-family: 'Outfit', sans-serif;
    font-size: 18px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 10px 20px rgba(184, 134, 11, 0.3);
    margin-top: 40px;
}

.btn-submit:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 30px rgba(212, 175, 55, 0.4);
    filter: brightness(1.1);
}

.btn-submit:active {
    transform: translateY(1px);
}

/* Modal Overlay (Lead Capture) */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 100;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.4s ease;
}

.modal-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

.modal-content {
    background: #0f172a;
    border: 1px solid var(--primary);
    border-radius: 20px;
    width: 90%;
    max-width: 500px;
    padding: 40px;
    box-shadow: 0 0 50px rgba(193, 122, 58, 0.25);
    transform: scale(0.9) translateY(20px);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.modal-overlay.active .modal-content {
    transform: scale(1) translateY(0);
}

.modal-icon {
    font-size: 40px;
    color: var(--primary);
    text-align: center;
    margin-bottom: 15px;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { transform: scale(1); filter: drop-shadow(0 0 0 rgba(193,122,58,0.7)); }
    50% { transform: scale(1.1); filter: drop-shadow(0 0 15px rgba(193,122,58,0.7)); }
    100% { transform: scale(1); filter: drop-shadow(0 0 0 rgba(193,122,58,0)); }
}

.modal-title {
    font-size: 24px;
    font-family: 'Cinzel', serif;
    font-weight: 700;
    text-align: center;
    margin-bottom: 10px;
    color: #D4AF37;
    letter-spacing: 0.5px;
}

.modal-text {
    text-align: center;
    color: #cbd5e1;
    font-size: 14px;
    margin-bottom: 30px;
}

/* Laudo View */
.laudo-view {
    display: none;
}

.laudo-view.active {
    display: block;
    animation: fadeIn 0.8s ease-out;
}

.laudo-card {
    background: rgba(0,0,0,0.4);
    border-left: 4px solid var(--primary);
    border-radius: 8px;
    padding: 30px;
    margin-bottom: 30px;
}

.laudo-card.critical { border-left-color: var(--danger); }
.laudo-card.warning { border-left-color: var(--warning); }

.laudo-title {
    font-family: 'Outfit', sans-serif;
    font-size: 22px;
    font-weight: 800;
    margin-bottom: 15px;
    color: white;
}

.laudo-card.critical .laudo-title { color: #fca5a5; }

.laudo-body {
    font-size: 15px;
    color: #cbd5e1;
    line-height: 1.6;
    margin-bottom: 16px;
}

.laudo-acao {
    font-size: 14px;
    font-weight: 600;
    color: #D4AF37;
    background: rgba(212, 175, 55, 0.08);
    border: 1px solid rgba(212, 175, 55, 0.2);
    padding: 10px 14px;
    border-radius: 6px;
    margin-top: 4px;
}

.cta-box {
    margin-top: 24px;
    padding: 18px 20px;
    background: rgba(212, 175, 55, 0.06);
    border: 1px solid rgba(212, 175, 55, 0.25);
    border-radius: 8px;
    text-align: center;
}

.cta-text {
    color: #D4AF37;
    font-size: 15px;
    font-weight: 600;
    margin: 0;
    line-height: 1.6;
}

.btn-cta {
    display: inline-block;
    padding: 15px 30px;
    background: linear-gradient(135deg, #B8860B, #D4AF37);
    color: #000;
    text-decoration: none;
    font-family: 'Outfit', sans-serif;
    font-weight: 800;
    border-radius: 8px;
    text-transform: uppercase;
    font-size: 16px;
    transition: all 0.3s ease;
    text-align: center;
    box-shadow: 0 5px 15px rgba(212, 175, 55, 0.4);
}

.btn-cta:hover {
    background: linear-gradient(135deg, #D4AF37, #F0C75E);
    transform: scale(1.05);
    box-shadow: 0 10px 25px rgba(212, 175, 55, 0.6);
    filter: brightness(1.1);
}

/* Helpers */
.hidden { display: none !important; }

/* ── Glossário Tooltip ───────────────────────────────────────────── */
.glossary-term {
    position: relative;
    border-bottom: 1px dashed rgba(148, 163, 184, 0.55);
    cursor: help;
    color: inherit;
    display: inline;
}

.glossary-term::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: calc(100% + 10px);
    left: 50%;
    transform: translateX(-50%);
    background: #1e293b;
    color: #e2e8f0;
    padding: 10px 14px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 400;
    line-height: 1.5;
    max-width: 300px;
    width: max-content;
    white-space: normal;
    border: 1px solid rgba(193, 122, 58, 0.35);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.6);
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.18s ease;
    z-index: 9999;
}

.glossary-term:hover::after,
.glossary-term.tooltip-active::after {
    opacity: 1;
}

/* ── Toast de notificação ────────────────────────────────────────── */
.nx-toast {
    position: fixed;
    bottom: 24px;
    right: 24px;
    background: #1e293b;
    border: 1px solid rgba(245, 158, 11, 0.45);
    color: #F59E0B;
    padding: 13px 20px;
    border-radius: 10px;
    font-size: 13px;
    line-height: 1.5;
    z-index: 9999;
    opacity: 0;
    transform: translateY(8px);
    transition: all 0.3s ease;
    max-width: 320px;
    pointer-events: none;
}
.nx-toast.show {
    opacity: 1;
    transform: translateY(0);
}

/* ── Responsive ─────────────────────────────────────────────────── */
@media (max-width: 1024px) {
    .app-container { max-width: 680px; }
}

@media (max-width: 768px) {
    .grid-3 { grid-template-columns: 1fr; gap: 15px; }
    .glass-panel { padding: 25px 20px; }
    .headline { font-size: 26px; }
}

@media (max-width: 600px) {
    .glass-panel { padding: 20px 16px; }
    .headline { font-size: 22px; }
    .subheadline { font-size: 14px; }
    .laudo-title { font-size: 18px; }
    .laudo-body { font-size: 14px; }
    .laudo-card { padding: 20px; }
    .btn-submit { font-size: 15px; padding: 14px; }
    .btn-cta { font-size: 14px; padding: 13px 22px; }
    .modal-content { padding: 28px 20px; }
    .section-title { font-size: 17px; }
}
