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

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

:root {
    /* Ferramentaria - Warm Amber */
    --ferramentaria: #f59e0b;
    --ferramentaria-dark: #d97706;
    --ferramentaria-light: #fbbf24;
    --ferramentaria-glow: rgba(245, 158, 11, 0.35);

    /* Garantia - Emerald */
    --garantia: #10b981;
    --garantia-dark: #059669;
    --garantia-light: #34d399;
    --garantia-glow: rgba(16, 185, 129, 0.35);

    /* Qualidade - Indigo */
    --qualidade: #6366f1;
    --qualidade-dark: #4f46e5;
    --qualidade-light: #818cf8;
    --qualidade-glow: rgba(99, 102, 241, 0.35);

    /* Customize - Rose */
    --customize: #f43f5e;
    --customize-dark: #e11d48;
    --customize-light: #fb7185;
    --customize-glow: rgba(244, 63, 94, 0.35);

    /* GarageHero - Cyan */
    --garagehero: #06b6d4;
    --garagehero-dark: #0891b2;
    --garagehero-light: #22d3ee;
    --garagehero-glow: rgba(6, 182, 212, 0.35);

    /* Neutral */
    --text-primary: #0f172a;
    --text-secondary: #64748b;
    --border: #e2e8f0;
}

/* Animated Mesh Background */
html {
    overflow: hidden;
    height: 100vh;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    color: var(--text-primary);
    background: #0a1628;
    overflow: hidden;
    position: relative;
}

body::before {
    display: none;
}

/* Floating Particles */
.particles {
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    overflow: hidden;
}

.particle {
    position: absolute;
    width: 4px;
    height: 4px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 50%;
    animation: float linear infinite;
}

@keyframes float {
    0% {
        transform: translateY(100vh) scale(0);
        opacity: 0;
    }
    10% {
        opacity: 1;
    }
    90% {
        opacity: 1;
    }
    100% {
        transform: translateY(-10vh) scale(1);
        opacity: 0;
    }
}

/* Noise Texture Overlay */
body::after {
    content: '';
    position: fixed;
    inset: 0;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='0.03'/%3E%3C/svg%3E");
    background-repeat: repeat;
    z-index: 0;
    pointer-events: none;
    opacity: 0.5;
}

.container {
    width: 100%;
    max-width: 1500px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

/* Header Styles */
.header {
    text-align: center;
    margin-bottom: 32px;
    animation: fadeInDown 1s cubic-bezier(0.16, 1, 0.3, 1);
}

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

.logo-image {
    height: 70px;
    width: auto;
    max-width: 100%;
    object-fit: contain;
    filter: drop-shadow(0 8px 24px rgba(0, 0, 0, 0.3));
    transition: all 600ms cubic-bezier(0.34, 1.56, 0.64, 1);
    animation: logoFloat 6s ease-in-out infinite;
}

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

.logo-image:hover {
    transform: scale(1.08);
    filter: drop-shadow(0 12px 32px rgba(0, 0, 0, 0.35));
}

.subtitle {
    font-size: 1.125rem;
    color: rgba(255, 255, 255, 0.6);
    font-weight: 400;
    letter-spacing: 0.3px;
    line-height: 1.6;
}

/* Main Content */
.main-content {
    animation: fadeInUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) 0.15s both;
}

.cards-grid {
    display: flex;
    flex-wrap: nowrap;
    gap: 16px;
    margin-bottom: 24px;
    justify-content: center;
}

.cards-grid > * {
    flex: 1 1 0;
    min-width: 0;
}

/* System Cards - Glassmorphism */
.system-card {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 40px 28px 36px;
    background: rgba(255, 255, 255, 0.04);
    border-radius: 24px;
    text-decoration: none;
    color: #ffffff;
    box-shadow:
        0 0 0 1px rgba(255, 255, 255, 0.06),
        0 20px 50px rgba(0, 0, 0, 0.25);
    transition: all 500ms cubic-bezier(0.34, 1.56, 0.64, 1);
    cursor: pointer;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
}

/* Animated gradient border on hover */
.system-card::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 24px;
    padding: 1px;
    background: linear-gradient(
        135deg,
        transparent 0%,
        var(--card-color-light) 50%,
        transparent 100%
    );
    -webkit-mask:
        linear-gradient(#fff 0 0) content-box,
        linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    opacity: 0;
    transition: opacity 500ms ease;
}

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

/* Bottom glow effect */
.system-card::after {
    content: '';
    position: absolute;
    bottom: -40px;
    left: 50%;
    transform: translateX(-50%);
    width: 70%;
    height: 80px;
    background: var(--card-glow);
    filter: blur(40px);
    border-radius: 50%;
    opacity: 0;
    transition: opacity 600ms ease;
    pointer-events: none;
}

.system-card:hover::after {
    opacity: 1;
}

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

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

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

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

/* Badge */
.badge-homologacao {
    position: absolute;
    top: 14px;
    right: 14px;
    background: linear-gradient(135deg, #f59e0b, #ef4444);
    color: #ffffff;
    font-size: 0.6875rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    padding: 5px 12px;
    border-radius: 20px;
    box-shadow: 0 4px 16px rgba(239, 68, 68, 0.4);
    z-index: 2;
}

.system-card:hover {
    transform: translateY(-10px);
    background: rgba(255, 255, 255, 0.07);
    box-shadow:
        0 0 0 1px rgba(255, 255, 255, 0.1),
        0 30px 70px rgba(0, 0, 0, 0.3);
    border-color: rgba(255, 255, 255, 0.12);
}

.system-card:active {
    transform: translateY(-4px);
    transition-duration: 100ms;
}

/* Card stagger animation */
.system-card:nth-child(1) { animation: cardReveal 0.7s cubic-bezier(0.16, 1, 0.3, 1) 0.2s both; }
.system-card:nth-child(2) { animation: cardReveal 0.7s cubic-bezier(0.16, 1, 0.3, 1) 0.35s both; }
.system-card:nth-child(3) { animation: cardReveal 0.7s cubic-bezier(0.16, 1, 0.3, 1) 0.5s both; }
.system-card:nth-child(4) { animation: cardReveal 0.7s cubic-bezier(0.16, 1, 0.3, 1) 0.65s both; }

@keyframes cardReveal {
    from {
        opacity: 0;
        transform: translateY(40px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Card Icon */
.card-icon {
    width: 72px;
    height: 72px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--card-color), var(--card-color-light));
    border-radius: 18px;
    margin-bottom: 16px;
    transition: all 500ms cubic-bezier(0.34, 1.56, 0.64, 1);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
    position: relative;
}

.card-icon::after {
    content: '';
    position: absolute;
    inset: -4px;
    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(16px);
}

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

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

.system-card:hover .card-icon {
    transform: scale(1.12) rotate(6deg);
    box-shadow: 0 16px 36px rgba(0, 0, 0, 0.25);
}

/* Card Content */
.card-content {
    text-align: center;
    margin-bottom: 12px;
}

.card-title {
    font-size: 1.375rem;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 10px;
    transition: all 400ms ease;
    letter-spacing: -0.3px;
}

.system-card:hover .card-title {
    color: var(--card-color-light);
}

.card-description {
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.45);
    line-height: 1.6;
    font-weight: 400;
}

.system-card:hover .card-description {
    color: rgba(255, 255, 255, 0.6);
}

/* Card Arrow */
.card-arrow {
    width: 38px;
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.06);
    border-radius: 50%;
    transition: all 500ms cubic-bezier(0.34, 1.56, 0.64, 1);
    margin-top: 4px;
    border: 1px solid rgba(255, 255, 255, 0.06);
}

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

.system-card:hover .card-arrow {
    background: var(--card-color);
    border-color: var(--card-color);
    transform: scale(1.1);
    box-shadow: 0 8px 20px var(--card-glow);
}

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

/* Customize Banner */
.customize-banner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 32px;
    padding: 28px 36px;
    background: rgba(255, 255, 255, 0.04);
    border-radius: 24px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow:
        0 0 0 1px rgba(255, 255, 255, 0.06),
        0 20px 50px rgba(0, 0, 0, 0.25);
    margin-bottom: 24px;
    position: relative;
    overflow: hidden;
    animation: cardReveal 0.7s cubic-bezier(0.16, 1, 0.3, 1) 0.8s both;
    transition: all 500ms cubic-bezier(0.34, 1.56, 0.64, 1);
    --card-color: var(--customize);
    --card-color-light: var(--customize-light);
    --card-glow: var(--customize-glow);
}

.customize-banner:hover {
    background: rgba(255, 255, 255, 0.07);
    border-color: rgba(255, 255, 255, 0.12);
    box-shadow:
        0 0 0 1px rgba(255, 255, 255, 0.1),
        0 30px 70px rgba(0, 0, 0, 0.3);
}

.customize-banner-header {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-shrink: 0;
}

.customize-banner-icon {
    width: 52px;
    height: 52px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--customize), var(--customize-light));
    border-radius: 14px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
    transition: all 500ms cubic-bezier(0.34, 1.56, 0.64, 1);
}

.customize-banner:hover .customize-banner-icon {
    transform: scale(1.1) rotate(6deg);
}

.customize-banner-icon svg {
    width: 26px;
    height: 26px;
    color: #ffffff;
}

.customize-banner-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: #ffffff;
    letter-spacing: -0.3px;
    transition: color 400ms ease;
}

.customize-banner:hover .customize-banner-title {
    color: var(--customize-light);
}

.customize-banner-desc {
    font-size: 0.8125rem;
    color: rgba(255, 255, 255, 0.45);
    font-weight: 400;
    margin-top: 2px;
}

.customize-banner-brands {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: flex-end;
    position: relative;
    z-index: 3;
}

.brand-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 24px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    font-size: 0.9375rem;
    font-weight: 600;
    font-family: inherit;
    letter-spacing: 0.2px;
    transition: all 400ms cubic-bezier(0.34, 1.56, 0.64, 1);
    cursor: pointer;
    white-space: nowrap;
    position: relative;
    z-index: 3;
}

.badge-new {
    font-size: 0.5rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    color: #34d399;
    padding: 2px 6px;
    border: 1px solid rgba(52, 211, 153, 0.3);
    border-radius: 20px;
    margin-left: 8px;
    line-height: 1;
    vertical-align: middle;
    background: rgba(16, 185, 129, 0.1);
    transition: all 400ms ease;
}

.brand-pill:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.18);
    color: #ffffff;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
}

.brand-pill:hover .badge-new {
    background: rgba(16, 185, 129, 0.2);
    border-color: rgba(52, 211, 153, 0.5);
    color: #5eead4;
}

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

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

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

.footer-text {
    font-weight: 400;
}

.footer-brand {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    margin-bottom: 10px;
}

.motorhero-logo {
    height: 36px;
    width: auto;
    opacity: 0.35;
    transition: all 400ms ease;
    filter: brightness(0) invert(1);
}

.motorhero-logo:hover {
    opacity: 0.7;
}

.footer-sep {
    width: 1px;
    height: 20px;
    background: rgba(255, 255, 255, 0.12);
}

.footer-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    text-decoration: none;
    color: rgba(255, 255, 255, 0.35);
    font-size: 0.875rem;
    font-weight: 400;
    transition: color 400ms ease;
}

.footer-link:hover {
    color: rgba(255, 255, 255, 0.7);
}

.footer-link svg {
    flex-shrink: 0;
}

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

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

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

/* Responsive Design */
@media (max-width: 900px) {
    html {
        overflow: auto;
        height: auto;
    }

    body {
        overflow: auto;
        height: auto;
    }

    .cards-grid {
        flex-wrap: wrap;
        max-width: 400px;
        margin-left: auto;
        margin-right: auto;
    }

    .cards-grid > * {
        flex: 1 1 100%;
    }

    .system-card {
        padding: 32px 24px 28px;
    }

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

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

    .customize-banner {
        flex-direction: column;
        text-align: center;
        padding: 28px 24px;
        max-width: 400px;
        margin-left: auto;
        margin-right: auto;
    }

    .customize-banner-header {
        flex-direction: column;
    }

    .customize-banner-brands {
        justify-content: center;
    }
}

@media (max-width: 768px) {
    .header {
        margin-bottom: 40px;
    }

    .logo-image {
        height: 70px;
    }

    .subtitle {
        font-size: 1.0625rem;
    }

    .cards-grid {
        gap: 20px;
        margin-bottom: 40px;
        max-width: 400px;
    }

    .system-card {
        padding: 36px 28px 32px;
    }

    .system-card:nth-child(3) {
        max-width: none;
    }

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

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

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

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

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

    .logo-image {
        height: 56px;
    }

    .subtitle {
        font-size: 0.9375rem;
    }

    .system-card {
        padding: 32px 24px 28px;
        border-radius: 20px;
    }

    .card-icon {
        width: 60px;
        height: 60px;
        border-radius: 18px;
    }

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

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

/* Focus Styles for Accessibility */
.system-card:focus-visible {
    outline: none;
    box-shadow:
        0 0 0 2px var(--card-color),
        0 0 0 4px rgba(255, 255, 255, 0.1),
        0 20px 50px rgba(0, 0, 0, 0.25);
}

/* 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;
    }

    .particle {
        display: none;
    }
}

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

    .particles {
        display: none;
    }

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