/* ============================================
   ENTRANDO A PITS - DESIGN SYSTEM
   Motorsport Media Platform - CSS Framework
   ============================================ */

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

/* ============================================
   CSS CUSTOM PROPERTIES - COLOR PALETTE
   ============================================ */
:root {
  /* Primary Colors - From Logo (Navy Blue) */
  --color-primary-dark: #0A2D4D;
  --color-primary: #1A3A5C;
  --color-primary-light: #2A4A6C;

  /* Secondary Colors - From Partner Banner (Purple/Magenta) */
  --color-secondary: #9B4DCA;
  --color-secondary-light: #B565E8;
  --color-secondary-dark: #7A3DA8;

  /* Accent Colors */
  --color-accent: #FF4D6D;
  --color-accent-gold: #FFD700;

  /* Neutral Colors */
  --color-white: #FFFFFF;
  --color-light-gray: #F5F7FA;
  --color-gray: #A0AEC0;
  --color-dark-gray: #2D3748;
  --color-black: #0F0F1E;

  /* Gradients */
  --gradient-primary: linear-gradient(135deg, var(--color-primary-dark) 0%, var(--color-primary) 50%, var(--color-secondary-dark) 100%);
  --gradient-secondary: linear-gradient(135deg, var(--color-secondary-dark) 0%, var(--color-secondary) 50%, var(--color-secondary-light) 100%);
  --gradient-overlay: linear-gradient(135deg, rgba(155, 77, 202, 0.85) 0%, rgba(26, 58, 92, 0.90) 100%);
  --gradient-card: linear-gradient(135deg, rgba(26, 58, 92, 0.7) 0%, rgba(155, 77, 202, 0.3) 100%);

  /* Typography */
  --font-primary: 'Outfit', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-secondary: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', 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 */

  /* Spacing */
  --space-xs: 0.25rem;
  /* 4px */
  --space-sm: 0.5rem;
  /* 8px */
  --space-md: 1rem;
  /* 16px */
  --space-lg: 1.5rem;
  /* 24px */
  --space-xl: 2rem;
  /* 32px */
  --space-2xl: 3rem;
  /* 48px */
  --space-3xl: 4rem;
  /* 64px */
  --space-4xl: 6rem;
  /* 96px */

  /* Border Radius */
  --radius-sm: 0.375rem;
  /* 6px */
  --radius-md: 0.5rem;
  /* 8px */
  --radius-lg: 1rem;
  /* 16px */
  --radius-xl: 1.5rem;
  /* 24px */
  --radius-full: 9999px;

  /* 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);
  --shadow-2xl: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
  --shadow-glow: 0 0 20px rgba(155, 77, 202, 0.4);

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

  /* Z-index */
  --z-dropdown: 1000;
  --z-sticky: 1020;
  --z-fixed: 1030;
  --z-modal-backdrop: 1040;
  --z-modal: 1050;
  --z-tooltip: 1070;
}

/* ============================================
   RESET & BASE STYLES
   ============================================ */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-secondary);
  font-size: var(--text-base);
  line-height: 1.6;
  color: var(--color-white);
  background: var(--color-black);
  overflow-x: hidden;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 10px;
}

::-webkit-scrollbar-track {
  background: var(--color-primary-dark);
}

::-webkit-scrollbar-thumb {
  background: var(--gradient-secondary);
  border-radius: var(--radius-full);
}

::-webkit-scrollbar-thumb:hover {
  background: var(--color-secondary-light);
}

/* ============================================
   TYPOGRAPHY
   ============================================ */
h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: var(--font-primary);
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: var(--space-md);
  color: var(--color-white);
}

h1 {
  font-size: var(--text-5xl);
  font-weight: 900;
  letter-spacing: -0.02em;
}

h2 {
  font-size: var(--text-4xl);
  font-weight: 700;
}

h3 {
  font-size: var(--text-3xl);
  font-weight: 600;
}

h4 {
  font-size: var(--text-2xl);
}

h5 {
  font-size: var(--text-xl);
}

h6 {
  font-size: var(--text-lg);
}

p {
  margin-bottom: var(--space-md);
  color: var(--color-light-gray);
}

a {
  color: var(--color-secondary-light);
  text-decoration: none;
  transition: color var(--transition-fast);
}

a:hover {
  color: var(--color-secondary);
}

strong {
  font-weight: 600;
}

/* ============================================
   LAYOUT UTILITIES
   ============================================ */
.container {
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 var(--space-lg);
}

.section {
  padding: var(--space-4xl) 0;
  position: relative;
}

.section-small {
  padding: var(--space-3xl) 0;
}

/* Grid System */
.grid {
  display: grid;
  gap: var(--space-xl);
}

.grid-2 {
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

.grid-3 {
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.grid-4 {
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
}

/* Flexbox Utilities */
.flex {
  display: flex;
}

.flex-center {
  display: flex;
  justify-content: center;
  align-items: center;
}

.flex-between {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.flex-col {
  display: flex;
  flex-direction: column;
}

/* ============================================
   HEADER & NAVIGATION
   ============================================ */
.header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  padding: var(--space-md) 0;
  background: var(--color-primary-dark);
  /* Exact brand color match */
  backdrop-filter: blur(10px);
  z-index: var(--z-fixed);
  border-bottom: 1px solid rgba(155, 77, 202, 0.3);
  transition: all var(--transition-base);
}

.header.scrolled {
  padding: 0.5rem 0;
  background: rgba(10, 45, 77, 0.98);
  box-shadow: var(--shadow-lg);
}

.nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.nav-logo img {
  height: 80px;
  /* Increased from 50px */
  width: auto;
  transition: transform var(--transition-base);
  display: block;
}

.nav-logo img:hover {
  transform: scale(1.05);
}

.nav-menu {
  display: flex;
  list-style: none;
  gap: var(--space-xl);
  align-items: center;
}

.nav-link {
  font-family: var(--font-primary);
  font-weight: 500;
  font-size: var(--text-base);
  color: var(--color-white);
  padding: var(--space-sm) var(--space-md);
  border-radius: var(--radius-md);
  transition: all var(--transition-fast);
  position: relative;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 50%;
  width: 0;
  height: 2px;
  background: var(--gradient-secondary);
  transition: all var(--transition-base);
  transform: translateX(-50%);
}

.nav-link:hover::after,
.nav-link.active::after {
  width: 80%;
}

.nav-link:hover {
  color: var(--color-secondary-light);
}

/* Social Icons */
.nav-social {
  display: flex;
  gap: var(--space-md);
  align-items: center;
}

.social-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: var(--radius-md);
  background: rgba(155, 77, 202, 0.1);
  color: var(--color-white);
  transition: all var(--transition-base);
  font-size: var(--text-lg);
}

.social-icon:hover {
  background: var(--gradient-secondary);
  transform: translateY(-2px);
  box-shadow: var(--shadow-glow);
}

/* Mobile Menu Toggle */
.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: var(--space-sm);
}

.nav-toggle span {
  width: 25px;
  height: 3px;
  background: var(--color-white);
  border-radius: var(--radius-full);
  transition: all var(--transition-base);
}

/* ============================================
   HERO SECTION
   ============================================ */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  padding-top: var(--space-4xl);
}

.hero-background {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
}

.hero-background img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.hero-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--gradient-overlay);
  z-index: 1;
}

/* Animated pattern */
.hero-pattern {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image:
    repeating-linear-gradient(45deg,
      transparent,
      transparent 20px,
      rgba(255, 255, 255, 0.02) 20px,
      rgba(255, 255, 255, 0.02) 40px);
  z-index: 2;
  animation: patternMove 20s linear infinite;
}

@keyframes patternMove {
  0% {
    background-position: 0 0;
  }

  100% {
    background-position: 56px 56px;
  }
}

.hero-content {
  position: relative;
  z-index: 3;
  text-align: center;
  max-width: 900px;
  padding: var(--space-2xl);
}

.hero-title {
  font-size: var(--text-6xl);
  font-weight: 900;
  margin-bottom: var(--space-lg);
  background: linear-gradient(135deg, var(--color-white) 0%, var(--color-secondary-light) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1.1;
  animation: fadeInUp 0.8s ease-out;
}

.hero-subtitle {
  font-size: var(--text-2xl);
  color: var(--color-light-gray);
  margin-bottom: var(--space-2xl);
  font-weight: 300;
  animation: fadeInUp 0.8s ease-out 0.2s both;
}

.hero-description {
  font-size: var(--text-lg);
  color: var(--color-gray);
  margin-bottom: var(--space-2xl);
  animation: fadeInUp 0.8s ease-out 0.4s both;
}

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

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ============================================
   BUTTONS
   ============================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
  padding: var(--space-md) var(--space-xl);
  font-family: var(--font-primary);
  font-size: var(--text-base);
  font-weight: 600;
  border-radius: var(--radius-lg);
  border: none;
  cursor: pointer;
  transition: all var(--transition-base);
  text-decoration: none;
  position: relative;
  overflow: hidden;
}

.btn::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
  transform: translate(-50%, -50%);
  transition: width 0.6s, height 0.6s;
}

.btn:hover::before {
  width: 300px;
  height: 300px;
}

.btn-primary {
  background: var(--gradient-secondary);
  color: var(--color-white);
  box-shadow: var(--shadow-md);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-glow);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.1);
  color: var(--color-white);
  border: 2px solid var(--color-secondary);
  backdrop-filter: blur(10px);
}

.btn-secondary:hover {
  background: rgba(155, 77, 202, 0.2);
  border-color: var(--color-secondary-light);
  transform: translateY(-2px);
}

.btn-group {
  display: flex;
  gap: var(--space-md);
  flex-wrap: wrap;
  justify-content: center;
  animation: fadeInUp 0.8s ease-out 0.6s both;
}

/* ============================================
   CARDS
   ============================================ */
.card {
  background: var(--gradient-card);
  backdrop-filter: blur(10px);
  border-radius: var(--radius-xl);
  overflow: hidden;
  transition: all var(--transition-base);
  border: 1px solid rgba(255, 255, 255, 0.1);
  height: 100%;
  display: flex;
  flex-direction: column;
}

.card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-2xl), var(--shadow-glow);
  border-color: rgba(155, 77, 202, 0.5);
}

.card-image {
  position: relative;
  width: 100%;
  height: 220px;
  overflow: hidden;
}

.card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--transition-slow);
}

.card:hover .card-image img {
  transform: scale(1.1);
}

.card-badge {
  position: absolute;
  top: var(--space-md);
  right: var(--space-md);
  padding: var(--space-xs) var(--space-md);
  background: var(--gradient-secondary);
  color: var(--color-white);
  font-size: var(--text-xs);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border-radius: var(--radius-full);
}

.card-content {
  padding: var(--space-lg);
  flex: 1;
  display: flex;
  flex-direction: column;
}

.card-title {
  font-size: var(--text-xl);
  font-weight: 700;
  margin-bottom: var(--space-sm);
  color: var(--color-white);
  font-family: var(--font-primary);
}

.card-description {
  font-size: var(--text-sm);
  color: var(--color-gray);
  margin-bottom: var(--space-md);
  flex: 1;
}

.card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: var(--space-md);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.card-link {
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--color-secondary-light);
  display: flex;
  align-items: center;
  gap: var(--space-xs);
}

.card-link:hover {
  gap: var(--space-sm);
}

/* ============================================
   SECTION HEADERS
   ============================================ */
.section-header {
  text-align: center;
  margin-bottom: var(--space-3xl);
}

.section-title {
  font-size: var(--text-4xl);
  font-weight: 900;
  margin-bottom: var(--space-md);
  background: linear-gradient(135deg, var(--color-white) 0%, var(--color-secondary-light) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.section-subtitle {
  font-size: var(--text-lg);
  color: var(--color-gray);
  max-width: 600px;
  margin: 0 auto;
}

/* ============================================
   PARTNERS SECTION
   ============================================ */
.partners-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: var(--space-xl);
  align-items: center;
}

.partner-card {
  background: rgba(255, 255, 255, 0.05);
  padding: var(--space-xl);
  border-radius: var(--radius-lg);
  text-align: center;
  transition: all var(--transition-base);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.partner-card:hover {
  background: rgba(155, 77, 202, 0.1);
  transform: translateY(-5px);
  border-color: var(--color-secondary);
}

.partner-card h4 {
  font-size: var(--text-lg);
  margin-bottom: var(--space-sm);
}

.partner-card p {
  font-size: var(--text-sm);
  color: var(--color-gray);
  margin-bottom: 0;
}

/* ============================================
   FOOTER
   ============================================ */
.footer {
  background: var(--color-primary-dark);
  padding: var(--space-3xl) 0 var(--space-lg);
  border-top: 1px solid rgba(155, 77, 202, 0.2);
}

.footer-content {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: var(--space-2xl);
  margin-bottom: var(--space-2xl);
}

.footer-section h4 {
  margin-bottom: var(--space-lg);
  font-size: var(--text-xl);
}

.footer-links {
  list-style: none;
}

.footer-links li {
  margin-bottom: var(--space-md);
}

.footer-links a {
  color: var(--color-gray);
  transition: color var(--transition-fast);
}

.footer-links a:hover {
  color: var(--color-secondary-light);
}

.footer-bottom {
  text-align: center;
  padding-top: var(--space-lg);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--color-gray);
  font-size: var(--text-sm);
}

/* ============================================
   ANIMATIONS
   ============================================ */
.fade-in {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ============================================
   RESPONSIVE DESIGN
   ============================================ */
@media (max-width: 1024px) {
  :root {
    --text-6xl: 2.5rem;
    --text-5xl: 2rem;
    --text-4xl: 1.75rem;
  }

  .grid-3,
  .grid-4 {
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  }
}

@media (max-width: 768px) {
  :root {
    --text-6xl: 2rem;
    --text-5xl: 1.75rem;
    --text-4xl: 1.5rem;
    --space-4xl: 3rem;
    --space-3xl: 2rem;
  }

  .nav-menu {
    position: fixed;
    top: 80px;
    left: -100%;
    width: 100%;
    height: calc(100vh - 80px);
    background: rgba(10, 45, 77, 0.98);
    backdrop-filter: blur(10px);
    flex-direction: column;
    padding: var(--space-2xl);
    transition: left var(--transition-base);
    gap: var(--space-lg);
    justify-content: flex-start;
  }

  .nav-menu.active {
    left: 0;
  }

  .nav-toggle {
    display: flex;
  }

  .nav-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(8px, 8px);
  }

  .nav-toggle.active span:nth-child(2) {
    opacity: 0;
  }

  .nav-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(8px, -8px);
  }

  .hero {
    min-height: 80vh;
  }

  .hero-content {
    padding: var(--space-lg);
  }

  .btn-group {
    flex-direction: column;
    width: 100%;
  }

  .btn {
    width: 100%;
  }

  .grid-2,
  .grid-3,
  .grid-4 {
    grid-template-columns: 1fr;
  }

  .partners-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 480px) {
  .container {
    padding: 0 var(--space-md);
  }

  .section {
    padding: var(--space-2xl) 0;
  }

  .hero-title {
    font-size: 1.75rem;
  }

  .hero-subtitle {
    font-size: var(--text-lg);
  }
}

/* ============================================
   ACCESSIBILITY
   ============================================ */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}

/* Focus Styles */
*:focus-visible {
  outline: 2px solid var(--color-secondary);
  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;
  }
}