/* ==========================================================================
   ALLPROCAR HOME — ap-home.css (V9 - Professional & Adaptive)
   Scope: SOLO HOME
   ========================================================================== */

:root {
  /* --- Palette --- */
  --ap-bg-dark: #05080e;
  --ap-bg-panel: #0b101b;
  
  --ap-text-primary: rgba(255, 255, 255, 0.95);
  --ap-text-secondary: rgba(255, 255, 255, 0.65);
  --ap-text-tertiary: rgba(255, 255, 255, 0.45);

  --ap-accent-blue: #3b82f6;
  --ap-accent-cyan: #06b6d4;
  --ap-accent-gold: #d4af37;
  
  /* --- Surfaces (Glass) --- */
  --ap-glass-bg: rgba(255, 255, 255, 0.03);
  --ap-glass-border: rgba(255, 255, 255, 0.08);
  --ap-glass-shine: rgba(255, 255, 255, 0.12);
  --ap-blur-md: 12px;
  
  /* --- Spacing & Radius --- */
  --ap-container-max: 1240px;
  --ap-radius-xl: 24px;
  --ap-radius-lg: 16px;
  --ap-radius-md: 12px;
  
  /* --- Animation --- */
  --ap-ease-elastic: cubic-bezier(0.175, 0.885, 0.32, 1.275);
  --ap-ease-smooth: cubic-bezier(0.4, 0, 0.2, 1);
  --ap-transition-fast: 200ms var(--ap-ease-smooth);
  --ap-transition-norm: 400ms var(--ap-ease-smooth);
}

/* Base Setup */
body.home {
  background-color: var(--ap-bg-dark);
  color: var(--ap-text-primary);
  font-family: 'Inter', system-ui, -apple-system, sans-serif; /* Ajustar a tu fuente */
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* Container */
.ap-container {
  width: 100%;
  max-width: var(--ap-container-max);
  margin-inline: auto;
  padding-inline: 20px;
  position: relative;
}

/* Utilities */
.ap-glass {
  background: var(--ap-glass-bg);
  backdrop-filter: blur(var(--ap-blur-md));
  -webkit-backdrop-filter: blur(var(--ap-blur-md));
  border: 1px solid var(--ap-glass-border);
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
}

.ap-text-gradient {
  background: linear-gradient(135deg, #fff 30%, var(--ap-accent-blue) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  display: inline-block;
}

.ap-text-gold { color: var(--ap-accent-gold); }

/* --- Reveal Animation --- */
[data-ap-reveal] {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s ease, transform 0.8s ease;
  will-change: opacity, transform;
}
.ap-home-loaded [data-ap-reveal].is-in {
  opacity: 1;
  transform: translateY(0);
}

/* ==========================================================================
   1. HERO SECTION
   ========================================================================== */
.ap-home-hero {
  position: relative;
  min-height: 100vh;
  min-height: 100svh; /* Mobile fix */
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  padding-top: 80px; /* Header offset */
}

/* Background Media */
.ap-home-hero__media {
  position: absolute;
  inset: 0;
  z-index: 0;
}
.ap-home-hero__video,
.ap-home-hero__image-bg {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.5;
  filter: saturate(1.1) contrast(1.1);
  transform: scale(1.05); /* Slight zoom for parallax feel */
}
.ap-home-hero__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, 
    rgba(5,8,14,0.3) 0%, 
    rgba(5,8,14,0.8) 60%, 
    var(--ap-bg-dark) 100%
  );
  z-index: 1;
}

/* Content */
.ap-home-hero__inner {
  position: relative;
  z-index: 10;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.ap-badge-capsule {
  display: inline-flex;
  padding: 6px 16px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 100px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ap-accent-blue);
  backdrop-filter: blur(4px);
  margin-bottom: 24px;
}

.ap-hero-title {
  font-size: clamp(40px, 6vw, 80px);
  line-height: 1.05;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 24px;
  text-shadow: 0 10px 30px rgba(0,0,0,0.5);
}

.ap-hero-lead {
  font-size: clamp(16px, 2vw, 20px);
  max-width: 700px;
  color: var(--ap-text-secondary);
  margin-bottom: 40px;
  line-height: 1.6;
}

/* Actions */
.ap-actions-group {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  justify-content: center;
}

.ap-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  border-radius: 12px;
  font-weight: 600;
  font-size: 15px;
  text-decoration: none;
  transition: all var(--ap-transition-fast);
  cursor: pointer;
}
.ap-btn--lg { padding: 16px 32px; font-size: 16px; }

.ap-btn--primary {
  background: var(--ap-accent-blue);
  color: #fff;
  border: 1px solid transparent;
  box-shadow: 0 4px 20px rgba(59, 130, 246, 0.4);
}
.ap-btn--primary:hover {
  background: #2563eb;
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(59, 130, 246, 0.5);
}

.ap-btn--glass {
  background: rgba(255,255,255,0.05);
  color: #fff;
  border: 1px solid rgba(255,255,255,0.1);
  backdrop-filter: blur(8px);
}
.ap-btn--glass:hover {
  background: rgba(255,255,255,0.1);
  border-color: #fff;
}

/* Trust Indicators */
.ap-hero-trust {
  margin-top: 48px;
  display: flex;
  gap: 24px;
  justify-content: center;
  flex-wrap: wrap;
}
.ap-trust-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  color: var(--ap-text-secondary);
  font-weight: 500;
}
.ap-check-icon {
  color: #10b981; /* Green */
  font-weight: bold;
}

/* Scroll Mouse Animation */
.ap-scroll-down {
  position: absolute;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 10;
  opacity: 0.7;
  transition: opacity 0.3s;
}
.ap-scroll-down:hover { opacity: 1; }

.ap-scroll-mouse {
  width: 26px;
  height: 42px;
  border: 2px solid rgba(255,255,255,0.4);
  border-radius: 20px;
  position: relative;
}
.ap-scroll-wheel {
  width: 4px;
  height: 8px;
  background: #fff;
  border-radius: 2px;
  position: absolute;
  top: 6px;
  left: 50%;
  transform: translateX(-50%);
  animation: scrollWheel 2s infinite;
}
@keyframes scrollWheel {
  0% { transform: translate(-50%, 0); opacity: 1; }
  100% { transform: translate(-50%, 14px); opacity: 0; }
}

/* ==========================================================================
   2. ROLES (Cards)
   ========================================================================== */
.ap-section-roles { padding: 100px 0; }
.ap-section-head { margin-bottom: 50px; max-width: 600px; }
.ap-section-head h2 { font-size: 32px; margin-bottom: 16px; color: #fff; }
.ap-section-head p { color: var(--ap-text-secondary); }
.ap-eyebrow {
  display: block;
  color: var(--ap-accent-blue);
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  margin-bottom: 12px;
  letter-spacing: 0.1em;
}

.ap-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 24px;
}

.ap-card {
  position: relative;
  background: var(--ap-bg-panel);
  border: 1px solid var(--ap-glass-border);
  border-radius: var(--ap-radius-xl);
  padding: 32px;
  text-decoration: none;
  overflow: hidden;
  transition: all var(--ap-transition-norm);
}

.ap-card--interactive:hover {
  transform: translateY(-8px);
  border-color: rgba(59, 130, 246, 0.3);
  box-shadow: 0 20px 40px -10px rgba(0,0,0,0.5);
}

.ap-card__header { display: flex; align-items: center; gap: 16px; margin-bottom: 20px; }
.ap-icon-box {
  width: 48px; height: 48px;
  display: grid; place-items: center;
  font-size: 24px;
  background: rgba(255,255,255,0.05);
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,0.05);
}

.ap-card__title { font-size: 20px; color: #fff; margin: 0; }
.ap-card__body p { color: var(--ap-text-secondary); line-height: 1.6; margin-bottom: 24px; }

.ap-link-text {
  font-size: 14px;
  font-weight: 600;
  color: var(--ap-accent-blue);
  display: flex;
  align-items: center;
  gap: 6px;
}
.ap-card--interactive:hover .ap-link-text span { transform: translateX(4px); transition: transform 0.3s; }

/* ==========================================================================
   3. ECOSYSTEM
   ========================================================================== */
.ap-section-ecosystem { padding: 120px 0; border-top: 1px solid var(--ap-glass-border); }
.ap-grid-2col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
}

.ap-content-sticky { position: sticky; top: 100px; }
.ap-feature-list { list-style: none; padding: 0; margin-top: 30px; display: grid; gap: 16px; }
.ap-feature-list li { display: flex; align-items: center; gap: 12px; font-size: 18px; color: var(--ap-text-primary); }
.ap-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--ap-accent-blue);
  box-shadow: 0 0 12px var(--ap-accent-blue);
}

.ap-img-responsive {
  width: 100%; height: auto;
  border-radius: var(--ap-radius-xl);
  border: 1px solid var(--ap-glass-border);
}

/* ==========================================================================
   4. TICKER (Infinite)
   ========================================================================== */
.ap-section-ticker { padding: 60px 0; overflow: hidden; }
.ap-ticker-wrapper {
  position: relative;
  padding: 20px 0;
  border-radius: var(--ap-radius-lg);
  overflow: hidden;
  max-width: 1000px;
  margin: 0 auto;
}

.ap-ticker-track {
  display: flex;
  gap: 60px;
  width: max-content;
  animation: tickerSlide 30s linear infinite;
}
.ap-ticker-track:hover { animation-play-state: paused; }

.ap-ticker-item img { height: 40px; width: auto; opacity: 0.4; filter: grayscale(100%); transition: 0.3s; }
.ap-ticker-item img:hover { opacity: 1; filter: grayscale(0%); }

@keyframes tickerSlide { 0% { transform: translateX(0); } 100% { transform: translateX(-50%); } }

/* Fades laterales para suavizar el corte */
.ap-ticker-fade {
  position: absolute; top: 0; bottom: 0; width: 100px; pointer-events: none; z-index: 2;
}
.ap-ticker-fade--left { left: 0; background: linear-gradient(to right, var(--ap-bg-dark), transparent); }
.ap-ticker-fade--right { right: 0; background: linear-gradient(to left, var(--ap-bg-dark), transparent); }

/* ==========================================================================
   5. COUNTDOWN
   ========================================================================== */
.ap-section-countdown { padding: 80px 0; }
.ap-countdown-card {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  padding: 40px 50px;
  border-radius: var(--ap-radius-xl);
  gap: 40px;
  background: linear-gradient(145deg, rgba(255,255,255,0.03), transparent);
}

.ap-countdown-info { flex: 1; min-width: 300px; }
.ap-badge-gold {
  color: var(--ap-accent-gold);
  border: 1px solid rgba(212, 175, 55, 0.3);
  padding: 4px 12px;
  border-radius: 50px;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 16px;
  display: inline-block;
}

.ap-timer-wrapper {
  display: flex;
  align-items: flex-start;
  gap: 16px;
}

.ap-timer-unit {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 70px;
}
.ap-timer-unit strong {
  font-size: 36px;
  line-height: 1;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  margin-bottom: 6px;
}
.ap-timer-label { font-size: 11px; text-transform: uppercase; opacity: 0.5; letter-spacing: 1px; }
.ap-timer-sep { font-size: 32px; opacity: 0.3; margin-top: -2px; }

/* ==========================================================================
   8. PILLARS
   ========================================================================== */
.ap-grid-4col {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  margin-top: 40px;
}

.ap-card-pillar {
  padding: 24px;
  border-radius: var(--ap-radius-lg);
  background: rgba(255,255,255,0.02);
  border: 1px solid rgba(255,255,255,0.05);
  transition: 0.3s;
}
.ap-card-pillar:hover { background: rgba(255,255,255,0.04); transform: translateY(-4px); }

.ap-pillar-icon { font-size: 32px; margin-bottom: 16px; }
.ap-card-pillar h3 { font-size: 18px; margin-bottom: 10px; color: #fff; }
.ap-card-pillar p { font-size: 14px; margin: 0; }

/* ==========================================================================
   9. FOUNDER & SPONSORS
   ========================================================================== */
.ap-grid-founder {
  display: grid;
  grid-template-columns: 0.8fr 1.2fr;
  gap: 60px;
  align-items: start;
}

.ap-logos-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
  gap: 16px;
}
.ap-logo-item {
  background: rgba(255,255,255,0.03);
  border-radius: 12px;
  aspect-ratio: 3/2;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255,255,255,0.05);
}
.ap-logo-item img { max-width: 60%; opacity: 0.5; filter: grayscale(100%); }

.ap-banner-cta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 40px;
  border-radius: var(--ap-radius-xl);
  background: linear-gradient(90deg, #1e3a8a 0%, #000 100%);
  border: 1px solid rgba(59, 130, 246, 0.3);
}
.ap-btn--white { background: #fff; color: #000; }
.ap-btn--white:hover { background: #f0f0f0; }

/* ==========================================================================
   RESPONSIVE MEDIA QUERIES
   ========================================================================== */
@media (max-width: 1024px) {
  .ap-grid-2col, .ap-grid-founder { grid-template-columns: 1fr; gap: 40px; }
  .ap-grid-4col { grid-template-columns: 1fr 1fr; }
  .ap-content-sticky { position: static; }
  .ap-countdown-card { flex-direction: column; align-items: flex-start; }
}

@media (max-width: 768px) {
  .ap-home-hero h1 { font-size: 42px; }
  .ap-actions-group { flex-direction: column; width: 100%; }
  .ap-btn { justify-content: center; width: 100%; }
  .ap-banner-cta { flex-direction: column; text-align: center; gap: 24px; }
  .ap-timer-wrapper { width: 100%; justify-content: space-between; }
  .ap-timer-sep { display: none; }
}

@media (max-width: 480px) {
  .ap-grid-4col { grid-template-columns: 1fr; }
  .ap-home-hero__inner { padding-inline: 16px; }
  .ap-card { padding: 24px; }
}

/* 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;
  }
}