/* ========================================
   INTAX - CUSTOM STYLES
   Inteligência Tributária e Tecnologia
   ======================================== */

/* CSS Variables - Design System */
:root {
    /* Brand Colors */
    --brand-primary: #009193;
    --brand-dark: #006e70;
    --brand-light: #33aeb0;
    --brand-soft: #e6f7f7;
    --brand-ring: #7bdfe1;

    /* Neutral Colors */
    --gray-50: #f9fafb;
    --gray-100: #f3f4f6;
    --gray-200: #e5e7eb;
    --gray-300: #d1d5db;
    --gray-600: #4b5563;
    --gray-700: #374151;
    --gray-800: #1f2937;
    --gray-900: #111827;

    /* Spacing */
    --spacing-xs: 0.25rem;
    --spacing-sm: 0.5rem;
    --spacing-md: 1rem;
    --spacing-lg: 1.5rem;
    --spacing-xl: 2rem;
    --spacing-2xl: 3rem;

    /* Typography */
    --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;

    /* Transitions */
    --transition-fast: 150ms ease;
    --transition-base: 300ms ease;
    --transition-slow: 500ms ease;

    /* Shadows */
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1);
    --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1);
    --shadow-2xl: 0 25px 50px -12px rgb(0 0 0 / 0.25);

    /* Border Radius */
    --radius-sm: 0.375rem;
    --radius-md: 0.5rem;
    --radius-lg: 0.75rem;
    --radius-xl: 1rem;
    --radius-full: 9999px;
}

/* ========================================
   GLOBAL RESETS & BASE STYLES
   ======================================== */

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

html {
    scroll-behavior: smooth;
    scroll-padding-top: 80px;
}

body {
    font-family: var(--font-sans);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    color: var(--gray-800);
    line-height: 1.6;
}

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

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

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

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

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

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

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.7;
    }
}

@keyframes shimmer {
    0% {
        background-position: -1000px 0;
    }
    100% {
        background-position: 1000px 0;
    }
}

/* Scroll Reveal Animation */
.reveal {
    opacity: 0;
    animation: fadeInUp 0.6s ease forwards;
}

.reveal-delay-1 { animation-delay: 0.1s; }
.reveal-delay-2 { animation-delay: 0.2s; }
.reveal-delay-3 { animation-delay: 0.3s; }
.reveal-delay-4 { animation-delay: 0.4s; }

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

.header-blur {
    backdrop-filter: blur(12px);
    background-color: rgba(255, 255, 255, 0.95);
}

.header-shadow {
    box-shadow: 0 4px 20px rgba(0, 145, 147, 0.08);
}

/* Mobile Menu */
.mobile-menu {
    position: fixed;
    top: 72px;
    left: 0;
    right: 0;
    background: white;
    transform: translateY(-100%);
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition-base);
    box-shadow: var(--shadow-lg);
    z-index: 40;
    max-height: calc(100vh - 72px);
    overflow-y: auto;
}

.mobile-menu.active {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
}

.mobile-menu-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition-base);
    z-index: 30;
    backdrop-filter: blur(2px);
}

.mobile-menu-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* Hamburger Animation */
.hamburger {
    width: 24px;
    height: 20px;
    position: relative;
    display: inline-block;
    cursor: pointer;
}

.hamburger span {
    display: block;
    position: absolute;
    height: 3px;
    width: 100%;
    background: var(--gray-700);
    border-radius: 3px;
    opacity: 1;
    left: 0;
    transform: rotate(0deg);
    transition: all var(--transition-base);
}

.hamburger span:nth-child(1) { top: 0px; }
.hamburger span:nth-child(2) { top: 8px; }
.hamburger span:nth-child(3) { top: 16px; }

.hamburger.active span:nth-child(1) {
    top: 8px;
    transform: rotate(135deg);
}

.hamburger.active span:nth-child(2) {
    opacity: 0;
    left: -60px;
}

.hamburger.active span:nth-child(3) {
    top: 8px;
    transform: rotate(-135deg);
}

/* Active Navigation Link */
.nav-link.active {
    color: var(--brand-primary) !important;
    position: relative;
}

.nav-link.active::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--brand-primary);
    border-radius: 2px;
}

/* ========================================
   BUTTON ENHANCEMENTS
   ======================================== */

.btn-primary {
    position: relative;
    overflow: hidden;
    isolation: isolate;
}

.btn-primary::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transform: translateX(-100%);
    transition: transform 0.6s ease;
}

.btn-primary:hover::before {
    transform: translateX(100%);
}

.btn-3d {
    box-shadow:
        0 4px 6px -1px rgba(0, 145, 147, 0.3),
        0 2px 4px -1px rgba(0, 145, 147, 0.2);
    transition: all var(--transition-base);
}

.btn-3d:hover {
    transform: translateY(-2px);
    box-shadow:
        0 10px 15px -3px rgba(0, 145, 147, 0.4),
        0 4px 6px -2px rgba(0, 145, 147, 0.3);
}

.btn-3d:active {
    transform: translateY(0);
    box-shadow:
        0 2px 4px -1px rgba(0, 145, 147, 0.2);
}

/* ========================================
   CARD ENHANCEMENTS
   ======================================== */

.card-hover {
    transition: all var(--transition-base);
    position: relative;
}

.card-hover::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: linear-gradient(135deg, var(--brand-soft), transparent);
    opacity: 0;
    transition: opacity var(--transition-base);
    z-index: -1;
}

.card-hover:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: var(--shadow-2xl);
}

.card-hover:hover::before {
    opacity: 1;
}

/* Glassmorphism Effect */
.glass-card {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

/* ========================================
   GRADIENT OVERLAYS & EFFECTS
   ======================================== */

.gradient-overlay {
    position: relative;
    isolation: isolate;
}

.gradient-overlay::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(0, 145, 147, 0.95), rgba(51, 174, 176, 0.85));
    z-index: -1;
}

.text-gradient {
    background: linear-gradient(135deg, var(--brand-primary), var(--brand-light));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ========================================
   FLOATING ELEMENTS
   ======================================== */

.float-animation {
    animation: float 3s ease-in-out infinite;
}

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

/* WhatsApp & Back to Top Buttons */
.floating-btn {
    transition: all var(--transition-base);
    position: relative;
}

.floating-btn::before {
    content: '';
    position: absolute;
    inset: -4px;
    border-radius: inherit;
    background: inherit;
    opacity: 0;
    filter: blur(8px);
    transition: opacity var(--transition-base);
}

.floating-btn:hover {
    transform: scale(1.1);
}

.floating-btn:hover::before {
    opacity: 0.6;
}

.floating-btn:active {
    transform: scale(0.95);
}

/* ========================================
   FORM ENHANCEMENTS
   ======================================== */

.form-input {
    transition: all var(--transition-base);
}

.form-input:focus {
    transform: translateY(-2px);
    box-shadow: 0 8px 16px -4px rgba(0, 145, 147, 0.2);
}

.form-input.error {
    border-color: #ef4444;
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1);
}

.form-input.success {
    border-color: #10b981;
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.1);
}

/* Input Label Float Effect */
.input-group {
    position: relative;
}

.input-group label {
    transition: all var(--transition-base);
}

.input-group input:focus + label,
.input-group input:not(:placeholder-shown) + label,
.input-group textarea:focus + label,
.input-group textarea:not(:placeholder-shown) + label {
    transform: translateY(-140%) scale(0.85);
    color: var(--brand-primary);
}

/* ========================================
   LOADING STATES
   ======================================== */

.skeleton {
    background: linear-gradient(
        90deg,
        var(--gray-200) 0%,
        var(--gray-100) 50%,
        var(--gray-200) 100%
    );
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
}

.spinner {
    border: 3px solid var(--gray-200);
    border-top-color: var(--brand-primary);
    border-radius: var(--radius-full);
    width: 24px;
    height: 24px;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ========================================
   ACCESSIBILITY ENHANCEMENTS
   ======================================== */

.skip-link {
    position: absolute;
    top: -40px;
    left: 0;
    background: var(--brand-primary);
    color: white;
    padding: 8px 16px;
    text-decoration: none;
    border-radius: 0 0 var(--radius-md) 0;
    z-index: 100;
}

.skip-link:focus {
    top: 0;
}

/* Focus Visible Styles */
:focus-visible {
    outline: 2px solid var(--brand-ring);
    outline-offset: 2px;
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

/* ========================================
   UTILITY CLASSES
   ======================================== */

.text-balance {
    text-wrap: balance;
}

.overflow-wrap {
    overflow-wrap: break-word;
}

.backdrop-blur {
    backdrop-filter: blur(8px);
}

.no-scrollbar::-webkit-scrollbar {
    display: none;
}

.no-scrollbar {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

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

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

    .mobile-padding {
        padding-left: 1rem;
        padding-right: 1rem;
    }
}

/* ========================================
   DARK MODE SUPPORT (Future)
   ======================================== */

@media (prefers-color-scheme: dark) {
    /* Preparado para modo escuro futuro */
}

/* ========================================
   PRINT STYLES
   ======================================== */

@media print {
    .no-print {
        display: none !important;
    }
}
