/* ============================================
   CARTAMA MX PARK - DESIGN SYSTEM
   ============================================ */

@font-face {
    font-family: 'Racing Sunday';
    src: url('fonts/RacingSunday-Italic.otf') format('opentype');
    font-weight: normal;
    font-style: italic;
    font-display: swap;
}

/* CSS RESET */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

/* CSS VARIABLES - DESIGN TOKENS */
:root {
    /* Colors - Motocross Energy Palette */
    --color-primary: #2d66af;
    /* Blue corporate - Main */
    --color-primary-dark: #1a427a;
    /* Blue darker */
    --color-primary-light: #2dade4;
    /* Blue light / Contrast */

    --color-secondary: #4B2E2B;
    /* Tierra oscura / marrón */
    --color-dark: #111111;
    /* Negro grafito */
    --color-gray: #4B5563;
    /* Gris medio */
    --color-gray-light: #9CA3AF;
    /* Gris claro */
    --color-light: #F9FAFB;
    /* Blanco roto */
    --color-white: #FFFFFF;

    --color-success: #10B981;
    --color-warning: #F59E0B;
    --color-danger: #EF4444;

    /* Typography */
    --font-heading: 'Oswald', sans-serif;
    --font-body: 'Inter', sans-serif;
    --font-racing: 'Racing Sunday', sans-serif;

    /* Font Sizes */
    --text-xs: 0.75rem;
    /* 12px */
    --text-sm: 0.875rem;
    /* 14px */
    --text-base: 1rem;
    /* 16px */
    --text-lg: 1.125rem;
    /* 18px */
    --text-xl: 1.25rem;
    /* 20px */
    --text-2xl: 1.5rem;
    /* 24px */
    --text-3xl: 1.875rem;
    /* 30px */
    --text-4xl: 2.25rem;
    /* 36px */
    --text-5xl: 3rem;
    /* 48px */
    --text-6xl: 3.75rem;
    /* 60px */
    --text-7xl: 4.5rem;
    /* 72px */

    /* Spacing */
    --space-1: 0.25rem;
    /* 4px */
    --space-2: 0.5rem;
    /* 8px */
    --space-3: 0.75rem;
    /* 12px */
    --space-4: 1rem;
    /* 16px */
    --space-5: 1.25rem;
    /* 20px */
    --space-6: 1.5rem;
    /* 24px */
    --space-8: 2rem;
    /* 32px */
    --space-10: 2.5rem;
    /* 40px */
    --space-12: 3rem;
    /* 48px */
    --space-16: 4rem;
    /* 64px */
    --space-20: 5rem;
    /* 80px */
    --space-24: 6rem;
    /* 96px */

    /* 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);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
    --shadow-2xl: 0 25px 50px -12px rgba(0, 0, 0, 0.25);

    /* Border Radius */
    --radius-sm: 0.25rem;
    /* 4px */
    --radius-md: 0.5rem;
    /* 8px */
    --radius-lg: 1rem;
    /* 16px */
    --radius-xl: 1.5rem;
    /* 24px */
    --radius-full: 9999px;

    /* Transitions */
    --transition-fast: 150ms ease-in-out;
    --transition-base: 250ms ease-in-out;
    --transition-slow: 400ms ease-in-out;

    /* Z-index */
    --z-dropdown: 1000;
    --z-sticky: 1020;
    --z-fixed: 1030;
    --z-modal-backdrop: 1040;
    --z-modal: 1050;
    --z-popover: 1060;
    --z-tooltip: 1070;
}

/* BASE STYLES */
html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: var(--font-body);
    background-color: var(--color-white);
    color: var(--color-dark);
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* TYPOGRAPHY */
h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-heading);
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: var(--space-4);
    color: var(--color-dark);
    letter-spacing: -0.02em;
}

h1 {
    font-size: var(--text-5xl);
    margin-bottom: var(--space-6);
}

h2 {
    font-size: var(--text-4xl);
}

h3 {
    font-size: var(--text-3xl);
}

h4 {
    font-size: var(--text-2xl);
}

h5 {
    font-size: var(--text-xl);
}

h6 {
    font-size: var(--text-lg);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--color-primary);
    font-weight: 600;
}

p {
    margin-bottom: var(--space-4);
    color: var(--color-gray);
}

/* LINKS */
a {
    text-decoration: none;
    color: inherit;
    transition: color var(--transition-base);
}

a:hover {
    color: var(--color-primary);
}

/* IMAGES */
img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* BUTTONS */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-2);
    padding: var(--space-4) var(--space-8);
    font-family: var(--font-heading);
    font-size: var(--text-base);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border: none;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all var(--transition-base);
    white-space: nowrap;
}

.btn-primary {
    background: linear-gradient(135deg, var(--color-primary-light) 0%, var(--color-primary) 100%);
    color: var(--color-white);
    box-shadow: var(--shadow-md);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-xl);
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-light) 100%);
}

.btn-secondary {
    background-color: transparent;
    color: var(--color-white);
    border: 2px solid var(--color-white);
}

.btn-secondary:hover {
    background-color: var(--color-white);
    color: var(--color-dark);
}

.btn-outline {
    background-color: transparent;
    color: var(--color-primary);
    border: 2px solid var(--color-primary);
}

.btn-outline:hover {
    background-color: var(--color-primary);
    color: var(--color-white);
}

/* CONTAINER */
.container {
    width: 100%;
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 var(--space-6);
}

.container-wide {
    max-width: 1536px;
}

.container-narrow {
    max-width: 960px;
}

/* SECTIONS */
section {
    padding: var(--space-20) 0;
}

.section-title {
    text-align: center;
    margin-bottom: var(--space-12);
}

.section-subtitle {
    font-family: var(--font-body);
    font-size: var(--text-xl);
    font-weight: 400;
    color: var(--color-gray);
    margin-top: var(--space-3);
}

/* UTILITY CLASSES */
.text-center {
    text-align: center;
}

.text-primary {
    color: var(--color-primary);
}

.text-white {
    color: var(--color-white);
}

.bg-dark {
    background-color: var(--color-dark);
}

.bg-light {
    background-color: var(--color-light);
}

.mb-0 {
    margin-bottom: 0;
}

.mb-4 {
    margin-bottom: var(--space-4);
}

.mb-8 {
    margin-bottom: var(--space-8);
}

.mb-12 {
    margin-bottom: var(--space-12);
}

.mt-0 {
    margin-top: 0;
}

.mt-4 {
    margin-top: var(--space-4);
}

.mt-8 {
    margin-top: var(--space-8);
}

.mt-12 {
    margin-top: var(--space-12);
}

/* ANIMATIONS */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@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);
    }
}

.fade-in {
    animation: fadeIn 0.8s ease-out;
}

.slide-in-left {
    animation: slideInLeft 0.6s ease-out;
}

.slide-in-right {
    animation: slideInRight 0.6s ease-out;
}

/* Hero Stamp */
/* Hero Stamp - MOVED TO END OF FILE
.hero__stamp {
    position: absolute;
    top: 15%;
    right: 15%;
    z-index: 10;
    transform: rotate(-12deg);
    border: 5px solid var(--color-white);
    padding: var(--space-4) var(--space-8);
    color: var(--color-white);
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: var(--text-3xl);
    line-height: 1.1;
    text-transform: uppercase;
    text-align: center;
    background: rgba(220, 38, 38, 0.85);
    box-shadow: var(--shadow-xl);
    border-radius: var(--radius-sm);
    animation: stampIn 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275) 0.5s both;
    backdrop-filter: blur(5px);
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.hero__stamp .text-highlight {
    display: block;
    font-size: var(--text-5xl);
    font-weight: 800;
    margin-top: 5px;
}

@keyframes stampIn {
    0% {
        opacity: 0;
        transform: rotate(-12deg) scale(2);
    }

    100% {
        opacity: 1;
        transform: rotate(-12deg) scale(1);
    }
}
*/

/* Hero Responsive */
/* Mobile override for stamp to keep it static if needed */
@media (max-width: 768px) {
    .hero__stamp {
        position: static !important;
        display: inline-block !important;
        margin-bottom: 1.5rem;
        transform: rotate(-5deg);
        font-size: 1.25rem;
        padding: 0.75rem 1.5rem;
        background-color: rgba(220, 38, 38, 0.95) !important;
        /* Force Red on Mobile */
        border: 3px solid #ffffff !important;
        /* Force Border */
        box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.2);
    }

    .hero__stamp .text-highlight {
        font-size: 2rem;
    }

    .hero {
        min-height: 90vh;
    }
}

/* RESPONSIVE */
@media (max-width: 768px) {
    :root {
        --text-5xl: 2.5rem;
        /* 40px */
        --text-4xl: 2rem;
        /* 32px */
        --text-3xl: 1.5rem;
        /* 24px */
    }

    .container {
        padding: 0 var(--space-4);
    }

    section {
        padding: var(--space-12) 0;
    }

    .btn {
        padding: var(--space-3) var(--space-6);
        font-size: var(--text-sm);
    }
}

/* FOOTER CONTRAST FIX */
.footer p,
.footer li,
.footer a {
    color: var(--color-gray-light);
}

.footer h4,
.footer h5 {
    color: var(--color-white);
}

/* FLOATING BUTTONS */
.floating-buttons {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    z-index: var(--z-fixed);
}

.btn-float {
    width: 3.5rem;
    height: 3.5rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    box-shadow: var(--shadow-lg);
    transition: transform var(--transition-base), box-shadow var(--transition-base);
    text-decoration: none;
}

.btn-float:hover {
    transform: scale(1.1);
    box-shadow: var(--shadow-xl);
    color: white;
}

.btn-float svg {
    width: 1.75rem;
    height: 1.75rem;
    fill: currentColor;
}

.btn-phone {
    background-color: var(--color-primary);
}

.btn-whatsapp {
    background-color: #25D366;
}

@media (max-width: 768px) {
    .floating-buttons {
        bottom: 1.5rem;
        right: 1.5rem;
        gap: 0.75rem;
    }

    .btn-float {
        width: 3rem;
        height: 3rem;
    }

    .btn-float svg {
        width: 1.5rem;
        height: 1.5rem;
    }
}

/* Utilities */
.hidden {
    display: none !important;
}

/* Button Outline for Download */
.btn-outline {
    background: transparent;
    border: 2px solid #0f172a;
    color: #0f172a !important;
    /* Force dark text */
    font-weight: 600;
}

.btn-outline:hover {
    background: #0f172a;
    color: #fff !important;
}

/* WhatsApp Button */
.btn-whatsapp {
    background: #25D366;
    color: white;
    border: none;
}

.btn-whatsapp:hover {
    background: #128C7E;
}

/* -- FIXED HERO STAMP (DESKTOP + SHARED) -- */
.hero__stamp {
    position: absolute !important;
    top: 15%;
    right: 15%;
    z-index: 20;
    transform: rotate(-12deg);
    border: 5px solid #ffffff;
    padding: 1rem 2rem;
    color: #ffffff !important;
    font-family: 'Oswald', sans-serif;
    font-weight: 700;
    font-size: 1.875rem;
    line-height: 1.1;
    text-transform: uppercase;
    text-align: center;
    background-color: rgba(220, 38, 38, 0.9) !important;
    /* Ensure Red */
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    border-radius: 0.125rem;
    animation: stampInFix 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275) 0.5s both;
    backdrop-filter: blur(5px);
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.hero__stamp .text-highlight {
    display: block;
    font-size: 3rem;
    font-weight: 800;
    margin-top: 5px;
    color: #ffffff !important;
}

@keyframes stampInFix {
    0% {
        opacity: 0;
        transform: rotate(-12deg) scale(2);
    }

    100% {
        opacity: 1;
        transform: rotate(-12deg) scale(1);
    }
}