/* 
 * Advor.com.br - Design System v2.0
 * Premium Legal SaaS Aesthetic
 */

:root {
    /* Colors - Dark Ethereal Palette */
    --bg-dark: #030305;
    --bg-card: rgba(10, 10, 18, 0.6);
    --primary: #d4af37; /* Gold */
    --primary-glow: rgba(212, 175, 55, 0.35);
    --secondary: #00f2fe; /* Tech Blue */
    --secondary-glow: rgba(0, 242, 254, 0.25);
    --accent: #8b5cf6; /* Violet */
    
    --text-main: #f8fafc;
    --text-dim: #94a3b8;
    --glass-border: rgba(255, 255, 255, 0.08);
    --glass-highlight: rgba(255, 255, 255, 0.03);
    
    /* Spacing */
    --section-padding: clamp(80px, 12vh, 160px) 5%;
    --container-max: 1200px;
    --radius-lg: 32px;
    --radius-md: 16px;
    
    /* Typography */
    --font-heading: 'Outfit', sans-serif;
    --font-body: 'Inter', sans-serif;
    
    /* Transitions */
    --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
    --transition-base: 0.4s var(--ease-out-expo);
}

/* Base Reset */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    cursor: none !important; /* Disable default cursor for custom one */
}

@media (max-width: 1024px) {
    * { cursor: auto !important; }
    .cursor-dot, .cursor-outline { display: none; }
}

html {
    scroll-behavior: smooth;
    background-color: var(--bg-dark);
}

body {
    background-color: var(--bg-dark);
    color: var(--text-main);
    font-family: var(--font-body);
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

/* Background Effects */
.bg-noise {
    position: fixed;
    inset: 0;
    z-index: -1;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
    opacity: 0.05;
    pointer-events: none;
}

.bg-blobs {
    position: fixed;
    inset: 0;
    z-index: -2;
    overflow: hidden;
    filter: blur(100px);
}

.blob {
    position: absolute;
    width: 60vw;
    height: 60vw;
    border-radius: 50%;
    opacity: 0.4;
    transition: transform 0.5s ease-out;
}

#blob-primary {
    top: -10%;
    left: -10%;
    background: radial-gradient(circle, var(--primary-glow) 0%, transparent 70%);
}

#blob-secondary {
    bottom: -10%;
    right: -10%;
    background: radial-gradient(circle, var(--secondary-glow) 0%, transparent 70%);
}

#blob-tertiary {
    top: 40%;
    left: 50%;
    width: 40vw;
    height: 40vw;
    background: radial-gradient(circle, rgba(139, 92, 246, 0.15) 0%, transparent 70%);
}

/* Typography */
h1, h2, h3, h4 {
    font-family: var(--font-heading);
    font-weight: 700;
    letter-spacing: -0.03em;
}

.title-lg {
    font-size: clamp(2.5rem, 6vw, 4.5rem);
    line-height: 1.1;
    margin-bottom: 1.5rem;
}

.gradient-text {
    background: linear-gradient(135deg, #fff 30%, var(--primary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.gradient-text-alt {
    background: linear-gradient(135deg, #fff 30%, var(--secondary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.primary-text { color: var(--primary); }

/* Navigation */
.nav {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    padding: 24px 5%;
    z-index: 1000;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: var(--transition-base);
}

.nav.scrolled {
    padding: 16px 5%;
    background: rgba(3, 3, 5, 0.8);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--glass-border);
}

.logo {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 800;
    color: #fff;
    text-decoration: none;
    letter-spacing: -1px;
}

.logo span { color: var(--primary); }

.nav-links {
    display: flex;
    gap: 32px;
}

.nav-links a {
    color: var(--text-dim);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    transition: var(--transition-base);
}

.nav-links a:hover {
    color: #fff;
}

.nav-highlight {
    color: var(--primary) !important;
    border: 1px solid rgba(212, 175, 55, 0.3);
    padding: 6px 16px;
    border-radius: 50px;
    transition: var(--transition-base);
}

.nav-highlight:hover {
    background: var(--primary-glow);
    border-color: var(--primary);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px var(--primary-glow);
}

/* Sections */
section {
    padding: var(--section-padding);
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.hero {
    min-height: 100vh;
    justify-content: center;
    text-align: center;
    padding-top: 100px;
}

.hero-container {
    max-width: 900px;
}

.hero-subtitle {
    font-size: clamp(1.1rem, 2vw, 1.3rem);
    color: var(--text-dim);
    max-width: 650px;
    margin: 0 auto 48px;
}

/* Components */
.badge {
    display: inline-block;
    padding: 6px 16px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
    border-radius: 100px;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--primary);
    margin-bottom: 24px;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.btn-primary {
    display: inline-block;
    padding: 18px 40px;
    background: #fff;
    color: var(--bg-dark);
    text-decoration: none;
    font-weight: 700;
    border-radius: 100px;
    transition: var(--transition-base);
}

.btn-primary:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 30px rgba(255, 255, 255, 0.2);
}

/* Grid & Cards */
.saas-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 32px;
    max-width: var(--container-max);
    width: 100%;
    margin-top: 64px;
}

.glass {
    background: var(--bg-card);
    backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    padding: 48px;
    transition: var(--transition-base);
    position: relative;
    overflow: hidden;
}

.glass::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--glass-highlight) 0%, transparent 100%);
    pointer-events: none;
}

.glass:hover {
    border-color: rgba(255, 255, 255, 0.2);
    transform: translateY(-8px);
}

.card-icon {
    font-family: var(--font-heading);
    font-size: 3rem;
    font-weight: 800;
    opacity: 0.1;
    margin-bottom: 16px;
}

.saas-card h3 {
    font-size: 1.75rem;
    margin-bottom: 16px;
}

.saas-card p {
    color: var(--text-dim);
    margin-bottom: 32px;
}

.badge-soon {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--secondary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* Features Grid */
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 40px;
    max-width: var(--container-max);
    width: 100%;
    margin-top: 48px;
}

.feature-item {
    text-align: left;
    padding: 32px;
    border-left: 1px solid var(--glass-border);
}

.feature-item h4 {
    font-size: 1.5rem;
    margin-bottom: 12px;
}

.feature-item p {
    color: var(--text-dim);
}

/* FAQ */
.faq-container {
    max-width: 800px;
    width: 100%;
    margin-top: 48px;
}

.faq-item {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
    padding: 24px;
    margin-bottom: 16px;
    text-align: left;
}

.faq-item h4 {
    margin-bottom: 12px;
    color: #fff;
}

.faq-item p {
    color: var(--text-dim);
    font-size: 0.95rem;
}

/* Cursor */
.cursor-dot {
    width: 8px;
    height: 8px;
    background-color: #fff;
    position: fixed;
    top: 0;
    left: 0;
    transform: translate(-50%, -50%);
    border-radius: 50%;
    z-index: 10000;
    pointer-events: none;
    transition: width 0.3s, height 0.3s;
}

.cursor-outline {
    width: 40px;
    height: 40px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    position: fixed;
    top: 0;
    left: 0;
    transform: translate(-50%, -50%);
    border-radius: 50%;
    z-index: 10000;
    pointer-events: none;
    transition: all 0.15s ease-out;
}

/* Footer */
.footer {
    padding: 100px 5%;
    border-top: 1px solid var(--glass-border);
    text-align: center;
}

.logo-md {
    font-family: var(--font-heading);
    font-size: 2rem;
    font-weight: 800;
    color: #fff;
    text-decoration: none;
    display: block;
    margin-bottom: 16px;
}

.logo-md span { color: var(--primary); }

.footer p {
    color: var(--text-dim);
    font-size: 0.9rem;
}

/* Animations */
.reveal {
    opacity: 0;
    transform: translateY(40px);
    transition: all 1s var(--ease-out-expo);
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

/* Contact Form */
.contact-container {
    max-width: 600px;
    width: 100%;
    margin-top: 48px;
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 24px;
    text-align: left;
}

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

.form-group label {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-dim);
    margin-left: 4px;
}

.form-group input {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    padding: 14px 18px;
    color: #fff;
    font-family: var(--font-body);
    font-size: 1rem;
    transition: var(--transition-base);
}

.form-group input:focus {
    outline: none;
    border-color: var(--primary);
    background: rgba(255, 255, 255, 0.06);
    box-shadow: 0 0 15px rgba(212, 175, 55, 0.15);
}

.checkbox-group {
    flex-direction: row !important;
    align-items: center;
    gap: 12px !important;
    margin-top: 8px;
}

.checkbox-group input[type="checkbox"] {
    width: 20px !important;
    height: 20px !important;
    appearance: none;
    -webkit-appearance: none;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
    border-radius: 6px;
    position: relative;
    transition: var(--transition-base);
    padding: 0 !important;
}

.checkbox-group input[type="checkbox"]:checked {
    background: var(--primary);
    border-color: var(--primary);
}

.checkbox-group input[type="checkbox"]:checked::after {
    content: '✓';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: var(--bg-dark);
    font-size: 12px;
    font-weight: 900;
}

.checkbox-group label {
    margin: 0 !important;
    font-size: 0.9rem !important;
    color: var(--text-dim) !important;
    line-height: 1.2;
}

.form-status {
    margin-top: 16px;
    font-size: 0.9rem;
    text-align: center;
    border-radius: 8px;
    transition: var(--transition-base);
}

.form-status.success {
    color: #4ade80;
    padding: 10px;
    background: rgba(74, 222, 128, 0.1);
}

.form-status.error {
    color: #f87171;
    padding: 10px;
    background: rgba(248, 113, 113, 0.1);
}

/* Preloader */
#preloader {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    background-color: var(--bg-dark);
    z-index: 99999;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: transform 1s var(--ease-out-expo);
}

.preloader-content {
    text-align: center;
}

.preloader-content .logo {
    font-size: 3rem;
    opacity: 0;
    animation: fadeInOut 2.5s ease-in-out forwards;
}

.preloader-content .logo span { color: var(--primary); }

.loader-bar {
    width: 0;
    height: 1px;
    background: linear-gradient(to right, transparent, var(--primary), transparent);
    margin-top: 20px;
    animation: loadingBar 2s ease-in-out forwards;
}

@keyframes fadeInOut {
    0% { opacity: 0; transform: translateY(10px); }
    30% { opacity: 1; transform: translateY(0); }
    70% { opacity: 1; transform: translateY(0); }
    100% { opacity: 0; transform: translateY(-10px); }
}

@keyframes loadingBar {
    0% { width: 0; left: 50%; opacity: 0.5; }
    50% { width: 100%; left: 0; opacity: 1; }
    100% { width: 100%; left: 0; opacity: 0; }
}

.preloader-hidden {
    transform: translateY(-100%);
    pointer-events: none;
}

/* Animations Refinement */
.reveal {
    transition: all 1s var(--ease-out-expo);
}

/* Footer Extras */
.footer-extras {
    margin-top: 24px;
    display: flex;
    justify-content: center;
    gap: 20px;
}

.footer-link {
    color: var(--text-dim);
    text-decoration: none;
    font-size: 0.8rem;
    transition: var(--transition-base);
    opacity: 0.6;
}

.footer-link:hover {
    color: var(--primary);
    opacity: 1;
}

/* Modal System */
.modal-overlay {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    background: rgba(3, 3, 5, 0.85);
    backdrop-filter: blur(8px);
    z-index: 2000;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.4s var(--ease-out-expo);
}

.modal-content {
    max-width: 450px;
    width: 90%;
    text-align: center;
    transform: scale(0.9) translateY(20px);
    transition: transform 0.5s var(--ease-out-expo);
}

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

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

.modal-content h3 {
    font-size: 1.8rem;
    margin-bottom: 12px;
    color: #fff;
}

.modal-content p {
    color: var(--text-dim);
    margin-bottom: 24px;
}

.modal-content form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.modal-content input {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    padding: 14px 20px;
    color: #fff;
    font-size: 1rem;
    width: 100%;
}

.modal-actions {
    display: flex;
    gap: 12px;
    margin-top: 8px;
}

.modal-actions button {
    flex: 1;
    cursor: pointer;
}

.btn-secondary {
    background: transparent;
    border: 1px solid var(--glass-border);
    color: var(--text-dim);
    padding: 14px;
    border-radius: 100px;
    font-weight: 600;
    transition: var(--transition-base);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.05);
    color: #fff;
}

/* Scroll Lock */
body.modal-open {
    overflow: hidden;
}

/* Undo / Cancel Feature */
.undo-container {
    margin-top: 16px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    padding: 16px;
    overflow: hidden;
    animation: slideUp 0.4s var(--ease-out-expo);
}

.undo-progress-bar {
    width: 100%;
    height: 4px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 2px;
    margin-bottom: 12px;
    overflow: hidden;
}

.undo-progress {
    width: 100%;
    height: 100%;
    background: var(--primary);
    transform-origin: left;
    transition: transform 5s linear;
}

.undo-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
}

.undo-actions span {
    font-size: 0.85rem;
    color: var(--text-dim);
    font-weight: 500;
}

.btn-undo {
    background: transparent;
    border: 1px solid var(--primary);
    color: var(--primary);
    padding: 6px 16px;
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    cursor: pointer;
    transition: var(--transition-base);
}

.btn-undo:hover {
    background: var(--primary);
    color: var(--bg-dark);
    box-shadow: 0 0 15px var(--primary-glow);
}

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

/* Mobile Adjustments */
@media (max-width: 768px) {
    .nav-links { display: none; }
    .saas-grid { grid-template-columns: 1fr; }
    .glass { padding: 32px; }
}
