/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* Primary Colors - Modern Blue/Purple Gradient Theme */
    --primary: #2563eb;
    --primary-dark: #1e40af;
    --primary-light: #3b82f6;

    --secondary: #7c3aed;
    --secondary-dark: #6d28d9;

    /* Ferramentaria - Orange/Amber Theme */
    --ferramentaria: #f59e0b;
    --ferramentaria-dark: #d97706;
    --ferramentaria-light: #fbbf24;

    /* Garantia - Green/Emerald Theme */
    --garantia: #10b981;
    --garantia-dark: #059669;
    --garantia-light: #34d399;

    /* Neutral Colors */
    --background: #f8fafc;
    --surface: #ffffff;
    --text-primary: #1e293b;
    --text-secondary: #64748b;
    --border: #e2e8f0;

    /* Shadows */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);

    /* Transitions */
    --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-base: 300ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 500ms cubic-bezier(0.4, 0, 0.2, 1);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen',
        'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue',
        sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    background: linear-gradient(135deg, #1abc9c 0%, #3498db 50%, #16a085 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    color: var(--text-primary);
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
}

/* Header Styles */
.header {
    text-align: center;
    margin-bottom: 72px;
    animation: fadeInDown 0.8s ease-out;
}

.logo {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 28px;
}

.logo-image {
    height: 90px;
    width: auto;
    max-width: 100%;
    object-fit: contain;
    filter: drop-shadow(0 6px 12px rgba(0, 0, 0, 0.2));
    transition: all 500ms cubic-bezier(0.34, 1.56, 0.64, 1);
}

.logo-image:hover {
    transform: scale(1.05);
    filter: drop-shadow(0 8px 16px rgba(0, 0, 0, 0.25));
}

.subtitle {
    font-size: 1.375rem;
    color: rgba(255, 255, 255, 1);
    font-weight: 400;
    text-shadow: 0 3px 12px rgba(0, 0, 0, 0.25);
    letter-spacing: 0.2px;
    line-height: 1.6;
}

/* Main Content */
.main-content {
    animation: fadeInUp 0.6s ease-out 0.2s both;
}

.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 40px;
    margin-bottom: 60px;
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
}

/* System Cards */
.system-card {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 56px 40px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.95) 0%, rgba(255, 255, 255, 1) 100%);
    border-radius: 28px;
    text-decoration: none;
    color: var(--text-primary);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.12), 0 8px 24px rgba(0, 0, 0, 0.08);
    transition: all 400ms cubic-bezier(0.34, 1.56, 0.64, 1);
    cursor: pointer;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.3);
    backdrop-filter: blur(10px);
}

.system-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 8px;
    background: linear-gradient(90deg, var(--card-color), var(--card-color-light));
    border-radius: 28px 28px 0 0;
    transform: scaleX(0);
    transition: transform 500ms cubic-bezier(0.34, 1.56, 0.64, 1);
}

.system-card:hover::before {
    transform: scaleX(1);
}

.system-card.ferramentaria {
    --card-color: var(--ferramentaria);
    --card-color-dark: var(--ferramentaria-dark);
    --card-color-light: var(--ferramentaria-light);
}

.system-card.garantia {
    --card-color: var(--garantia);
    --card-color-dark: var(--garantia-dark);
    --card-color-light: var(--garantia-light);
}

.system-card:hover {
    transform: translateY(-12px) scale(1.03);
    box-shadow: 0 35px 80px rgba(0, 0, 0, 0.18), 0 15px 35px rgba(0, 0, 0, 0.12);
    border-color: rgba(255, 255, 255, 0.6);
}

.system-card:active {
    transform: translateY(-6px) scale(1.01);
}

.card-icon {
    width: 90px;
    height: 90px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--card-color), var(--card-color-light));
    border-radius: 24px;
    margin-bottom: 28px;
    transition: all 500ms cubic-bezier(0.34, 1.56, 0.64, 1);
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.12), 0 6px 12px rgba(0, 0, 0, 0.08);
    position: relative;
}

.card-icon::after {
    content: '';
    position: absolute;
    inset: -2px;
    background: linear-gradient(135deg, var(--card-color), var(--card-color-light));
    border-radius: 26px;
    z-index: -1;
    opacity: 0;
    transition: opacity 500ms ease;
    filter: blur(12px);
}

.system-card:hover .card-icon::after {
    opacity: 0.6;
}

.card-icon svg {
    width: 44px;
    height: 44px;
    color: #ffffff;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.15));
}

.system-card:hover .card-icon {
    transform: scale(1.15) rotate(8deg);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.18), 0 10px 20px rgba(0, 0, 0, 0.12);
}

.card-content {
    text-align: center;
    margin-bottom: 24px;
}

.card-title {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 14px;
    transition: all 400ms ease;
    letter-spacing: -0.5px;
}

.system-card:hover .card-title {
    color: var(--card-color);
    transform: scale(1.05);
}

.card-description {
    font-size: 1.0625rem;
    color: var(--text-secondary);
    line-height: 1.7;
    font-weight: 400;
}

.card-arrow {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, rgba(0, 0, 0, 0.04), rgba(0, 0, 0, 0.08));
    border-radius: 50%;
    transition: all 500ms cubic-bezier(0.34, 1.56, 0.64, 1);
    margin-top: 8px;
}

.card-arrow svg {
    width: 24px;
    height: 24px;
    color: var(--card-color);
    transition: all 500ms cubic-bezier(0.34, 1.56, 0.64, 1);
}

.system-card:hover .card-arrow {
    background: linear-gradient(135deg, var(--card-color), var(--card-color-light));
    transform: scale(1.1);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.15);
}

.system-card:hover .card-arrow svg {
    color: #ffffff;
    transform: translateX(6px);
}

/* Ripple Effect */
.ripple {
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.4);
    transform: scale(0);
    animation: ripple-animation 600ms ease-out;
    pointer-events: none;
}

@keyframes ripple-animation {
    to {
        transform: scale(4);
        opacity: 0;
    }
}

/* Footer */
.footer {
    text-align: center;
    padding: 32px 24px;
    color: rgba(255, 255, 255, 0.95);
    font-size: 0.9375rem;
    animation: fadeIn 0.8s ease-out 0.5s both;
}

.footer-text {
    margin-bottom: 20px;
    text-shadow: 0 2px 6px rgba(0, 0, 0, 0.25);
    font-weight: 400;
}

.developed-by {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
    margin-top: 20px;
    padding: 14px 28px;
    backdrop-filter: blur(12px);
    transition: all 400ms ease;
    margin-left: auto;
    margin-right: auto;
}

.developed-by:hover img {
    transform: scale(2) translateZ(0);
    will-change: transform;
    transition: transform 400ms ease;
}

.developed-text {
    font-size: 0.9375rem;
    color: rgba(255, 255, 255, 0.85);
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    font-weight: 400;
}

.motorhero-logo {
    height: 50px;
    width: auto;
    opacity: 0.92;
    transition: all 400ms ease;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
}

.developed-by:hover .motorhero-logo {
    opacity: 1;
    transform: scale(1.05);
}

/* Animations */
@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

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

/* Responsive Design */
@media (max-width: 768px) {
    .logo-image {
        height: 60px;
    }

    .subtitle {
        font-size: 1.125rem;
    }

    .cards-grid {
        grid-template-columns: 1fr;
        gap: 24px;
        margin-bottom: 40px;
    }

    .system-card {
        padding: 40px 24px;
    }

    .card-icon {
        width: 72px;
        height: 72px;
    }

    .card-icon svg {
        width: 36px;
        height: 36px;
    }

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

    .card-description {
        font-size: 0.9375rem;
    }

    .header {
        margin-bottom: 40px;
    }
}

@media (max-width: 480px) {
    body {
        padding: 16px;
    }

    .logo-image {
        height: 50px;
    }

    .subtitle {
        font-size: 1rem;
    }

    .system-card {
        padding: 32px 20px;
    }

    .card-icon {
        width: 64px;
        height: 64px;
    }

    .card-icon svg {
        width: 32px;
        height: 32px;
    }

    .card-title {
        font-size: 1.375rem;
    }
}

/* Focus Styles for Accessibility */
.system-card:focus {
    outline: none;
    border-color: var(--card-color);
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.1), var(--shadow-xl);
}

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

/* Print Styles */
@media print {
    body {
        background: white;
    }

    .system-card {
        box-shadow: none;
        border: 2px solid var(--border);
    }
}
