/* ─── Custom Fonts: Clean Family ─── */

@font-face {
  font-family: 'Clean';
  src: url('../assets/fonts/Clean-Bold.woff2') format('woff2'),
       url('../assets/fonts/Clean-Bold.woff') format('woff');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Clean';
  src: url('../assets/fonts/Clean.woff2') format('woff2'),
       url('../assets/fonts/Clean.woff') format('woff');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Clean';
  src: url('../assets/fonts/Clean-Light.woff2') format('woff2'),
       url('../assets/fonts/Clean-Light.woff') format('woff');
  font-weight: 300;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Clean-Light';
  src: url('../assets/fonts/Clean-Light.woff2') format('woff2'),
       url('../assets/fonts/Clean-Light.woff') format('woff');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

/* Clean Bold — cuerpo */
body {
  font-family: 'Clean', 'Inter', system-ui, sans-serif;
  font-weight: 700;
}

/* Clean Regular — títulos */
h1, h2, h3, h4, h5, h6 {
  font-family: 'Clean', 'Inter', system-ui, sans-serif;
  font-weight: 400;
}

/* Tipografía botones y nav — igual que badge Cofundador */
a[class*="rounded-full"],
a[class*="rounded-lg"],
a[class*="rounded-xl"],
button,
.nav-link {
  font-family: 'Clean', system-ui, sans-serif;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-indent: 0.05em;
  text-transform: uppercase;
  text-align: center;
  justify-content: center;
  align-items: center;
  line-height: 1;
}

/* ─── Custom Animations ─── */

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

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

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

.animate-fade-in {
  animation: fadeIn 0.8s ease-out both;
}

.animate-fade-in-up {
  animation: fadeInUp 0.8s ease-out both;
}

.delay-200 { animation-delay: 0.2s; }
.delay-300 { animation-delay: 0.3s; }
.delay-400 { animation-delay: 0.4s; }
.delay-600 { animation-delay: 0.6s; }

/* ─── Scroll Reveal ─── */

.reveal {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Direccional — desde la izquierda */
.reveal-left {
  opacity: 0;
  transform: translateX(-48px);
  transition: opacity 0.9s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.9s cubic-bezier(0.16, 1, 0.3, 1);
}
.reveal-left.visible {
  opacity: 1;
  transform: translateX(0);
}

/* Direccional — desde la derecha */
.reveal-right {
  opacity: 0;
  transform: translateX(48px);
  transition: opacity 0.9s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.9s cubic-bezier(0.16, 1, 0.3, 1);
}
.reveal-right.visible {
  opacity: 1;
  transform: translateX(0);
}

/* Delays para stagger */
.reveal-d1 { transition-delay: 0.1s; }
.reveal-d2 { transition-delay: 0.2s; }
.reveal-d3 { transition-delay: 0.3s; }
.reveal-d4 { transition-delay: 0.4s; }
.reveal-d5 { transition-delay: 0.5s; }
.reveal-d6 { transition-delay: 0.6s; }

/* Stagger children legacy */
.reveal:nth-child(2) { transition-delay: 0.1s; }
.reveal:nth-child(3) { transition-delay: 0.2s; }
.reveal:nth-child(4) { transition-delay: 0.3s; }

/* ─── Logo MDL — misma tipografía que h1 hero ─── */

#navbar a[href="#hero"] {
  font-family: 'Clean', system-ui, sans-serif;
  font-weight: 900;
  letter-spacing: -0.02em;
}

/* ─── Navbar ─── */

#navbar {
  background: rgba(26, 26, 26, 0.95);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

#navbar.scrolled {
  background: rgba(26, 26, 26, 0.98);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

/* ─── Active nav indicator ─── */

.nav-link {
  position: relative;
  text-transform: uppercase;
}

.nav-link.active {
  color: #0460D9;
  font-weight: 600;
}

.nav-link.active::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  right: 0;
  height: 2px;
  background: #0460D9;
  border-radius: 1px;
}

/* Dark section text overrides */
.section-dark .nav-link.active { color: #FAFAFA; }

/* ─── Smooth scroll ─── */

html {
  scroll-behavior: smooth;
  scroll-padding-top: 80px;
}

/* ─── Selection color ─── */

::selection {
  background: rgba(4, 96, 217, 0.3);
  color: white;
}

/* ─── Custom scrollbar ─── */

::-webkit-scrollbar {
  width: 6px;
}

::-webkit-scrollbar-track {
  background: #1A1A1A;
}

::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.2);
}

/* ─── Form focus states ─── */

input:focus,
textarea:focus,
select:focus {
  box-shadow: 0 0 0 2px rgba(4, 96, 217, 0.15);
}

/* ─── Button hover micro-interaction ─── */

a[class*="bg-brand-gold"]:active,
button[class*="bg-brand-gold"]:active {
  transform: scale(0.98);
}

/* ─── Gradient text utility ─── */

.text-gradient {
  background: linear-gradient(135deg, #0460D9, #0477BF, #0460D9);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ─── Hero parallax layer ─── */

@media (min-width: 1024px) {
  #hero {
    perspective: 1000px;
  }
}

/* ─── Card hover elevation ─── */

.group:hover {
  transform: translateY(-2px);
  transition: transform 0.3s ease;
}

/* ─── Book cover hover glow ─── */

#libro a[href*="amazon"]:hover {
  outline-color: #0460D9 !important;
  box-shadow: 0 0 0 6px rgba(4,96,217,0.25), 0 0 24px rgba(4,96,217,0.4) !important;
  transition: box-shadow 0.3s ease, outline-color 0.3s ease;
}

/* ─── Botones hero + CONTACTO hover glow ─── */

#navbar a[href="#colaboraciones"]:hover {
  box-shadow: 0 0 0 4px rgba(4,96,217,0.3), 0 0 20px rgba(4,96,217,0.45);
  transition: box-shadow 0.3s ease, transform 0.3s ease;
}

#hero a[href="#sobre"]:hover,
#hero a[href="#programas"]:hover {
  box-shadow: 0 0 0 4px rgba(255,255,255,0.12), 0 0 20px rgba(255,255,255,0.15);
  transition: box-shadow 0.3s ease, transform 0.3s ease;
}

/* ─── Loading state for images ─── */

img {
  transition: opacity 0.5s ease;
}

/* ─── Reduced motion preference ─── */

@media (prefers-reduced-motion: reduce) {
  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
  .animate-fade-in,
  .animate-fade-in-up {
    animation: none;
    opacity: 1;
  }
  html { scroll-behavior: auto; }
}

/* ─── Trust logos marquee ─── */

@keyframes marquee {
  0%   { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

.logos-marquee {
  width: 100%;
}

.logos-track {
  display: inline-flex;
  animation: marquee 18s linear infinite;
  opacity: 0.45;
  transition: opacity 0.5s ease;
}

.logos-track:hover {
  animation-play-state: paused;
  opacity: 0.75;
}

.trust-logo-img {
  display: inline-flex;
  align-items: center;
  transition: all 0.3s ease;
}

.trust-logo-img img {
  filter: brightness(0) invert(1);
  transition: filter 0.3s ease, transform 0.3s ease;
}

.trust-logo-img:hover img {
  filter: brightness(0) invert(1) sepia(1) saturate(5) hue-rotate(190deg) brightness(1.2);
}

.trust-logo-img:hover {
  transform: scale(1.08);
  filter: drop-shadow(0 0 10px rgba(4,96,217,0.6));
}

/* ─── Logos con fondo oscuro — filtro blanco alternativo ─── */

.logo-dark-src img {
  filter: grayscale(1) brightness(6) !important;
  transition: filter 0.3s ease, transform 0.3s ease;
}
.logo-dark-src:hover img {
  filter: grayscale(1) brightness(6) sepia(1) saturate(5) hue-rotate(190deg) brightness(1.2) !important;
}

/* ─── Floating CTA adjustments ─── */

#floatingCta.visible {
  transform: translateY(0);
}


/* ─── Countdown flip effect ─── */

#countdown [id^="cd-"] {
  transition: transform 0.3s ease;
}

/* ─── Tabular numbers ─── */

.tabular-nums {
  font-variant-numeric: tabular-nums;
}

/* ─── Print styles ─── */

@media print {
  nav, footer, .fixed { display: none !important; }
  body { background: white !important; color: black !important; }
  section { page-break-inside: avoid; }
}

/* ─── Testimonios carousel ─── */

@keyframes testimonios-scroll {
  0%   { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

.testimonios-track {
  display: flex;
  width: max-content;
  animation: testimonios-scroll 40s linear infinite;
  will-change: transform;
}

.testimonios-track:hover {
  animation-play-state: paused;
}
