/* public/css/landing.css */
/* Estilos específicos de la Landing Page pública (2026 Vanguard Edition) */

/* FONDO BLUEPRINT GRID & ORBES DE LUZ MÍSTICOS */
.gradient-mesh {
  position: fixed;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
  background-image: 
    radial-gradient(rgba(255, 255, 255, 0.04) 1px, transparent 1px),
    linear-gradient(to right, rgba(255, 255, 255, 0.015) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255, 255, 255, 0.015) 1px, transparent 1px);
  background-size: 32px 32px, 64px 64px, 64px 64px;
}

.mesh-light {
  position: absolute;
  top: 0;
  left: 0;
  width: 55vw;
  height: 55vw;
  max-width: 800px;
  max-height: 800px;
  border-radius: 50%;
  filter: blur(80px);
  will-change: transform;
}

.mesh-light-a {
  background: radial-gradient(circle, rgba(139, 92, 246, 0.45) 0%, rgba(124, 58, 237, 0.15) 45%, rgba(0, 0, 0, 0) 70%);
  opacity: 0.85;
}

.mesh-light-b {
  background: radial-gradient(circle, rgba(6, 182, 212, 0.4) 0%, rgba(56, 189, 248, 0.12) 45%, rgba(0, 0, 0, 0) 70%);
  opacity: 0.8;
}

/* Fondos semitransparentes para las secciones */
.section-tinted {
  background-color: rgba(3, 7, 18, 0.6);
  backdrop-filter: blur(12px);
}

.section-tinted-elev {
  background-color: rgba(15, 23, 42, 0.5);
  backdrop-filter: blur(16px);
  border-top: 1px solid var(--border-subtle);
  border-bottom: 1px solid var(--border-subtle);
}

@media (prefers-reduced-motion: reduce) {
  .mesh-light {
    display: none;
  }
}

/* FLASH DEL "CHOQUE" — decorativo, detrás de la tarjeta de Contacto.
   Se dispara vía JS (clase .mesh-collided en /js/parallax.js), con el MISMO
   cálculo de progreso de scroll que mueve las luces — no con el sistema
   genérico de .reveal — para que nunca quede desincronizado si se scrollea lento. */
.contact-flash {
  position: absolute;
  top: 15%;
  left: 50%;
  width: 60vw;
  height: 60vw;
  max-width: 750px;
  max-height: 750px;
  transform: translate(-50%, -50%) scale(0.4);
  border-radius: 50%;
  background: radial-gradient(circle, rgba(190, 225, 255, 0.9) 0%, rgba(94, 200, 255, 0.4) 35%, rgba(94, 200, 255, 0) 70%);
  opacity: 0;
  pointer-events: none;
  z-index: 0;
  will-change: opacity, transform;
}

.contact-flash.mesh-collided {
  animation: flash-burst 1.4s ease-out forwards;
}

@keyframes flash-burst {
  0%   { opacity: 0; transform: translate(-50%, -50%) scale(0.4); }
  30%  { opacity: 1; }
  100% { opacity: 0; transform: translate(-50%, -50%) scale(1.9); }
}

/* La tarjeta de Contacto "emerge" del choque — mismo disparador que el flash. */
.card-impact {
  opacity: 0;
  transform: scale(0.9) translateY(10px);
  /* Repite border-color/box-shadow de .card (components.css) — el shorthand de
     transition no se combina entre reglas, así que sin esto el hover de esta
     tarjeta en particular pierde esas dos transiciones. */
  transition: opacity 0.7s ease, transform 0.7s cubic-bezier(0.34, 1.56, 0.64, 1),
    border-color var(--transition-fast), box-shadow var(--transition-fast);
  will-change: opacity, transform;
}

.card-impact.mesh-collided {
  opacity: 1;
  transform: scale(1) translateY(0);
}

@media (prefers-reduced-motion: reduce) {
  .contact-flash {
    display: none;
  }
  .card-impact {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

.navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 900;
  background-color: rgba(3, 7, 18, 0.75);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  padding: 0.85rem 0;
  transition: all var(--transition-normal);
}

.nav-brand {
  font-family: var(--font-heading);
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--text-main);
  display: flex;
  align-items: center;
  gap: 0.35rem;
  letter-spacing: -0.02em;
}

.nav-brand span {
  background: var(--gradient-brand);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 1.75rem;
  list-style: none;
}

.nav-links a {
  color: var(--text-muted);
  font-weight: 500;
  font-size: 0.9375rem;
  transition: color var(--transition-fast);
}

.nav-links a:hover {
  color: var(--text-main);
  text-shadow: 0 0 12px rgba(255, 255, 255, 0.4);
}

.nav-toggle {
  display: none;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  width: 42px;
  height: 42px;
  color: var(--text-main);
  font-size: 1.25rem;
  cursor: pointer;
  align-items: center;
  justify-content: center;
}

/* Menú hamburguesa mobile */
@media (max-width: 860px) {
  .nav-toggle { display: flex; }

  .nav-links {
    position: fixed;
    top: 66px; left: 0; right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background-color: rgba(3, 7, 18, 0.96);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border-bottom: 1px solid var(--border-subtle);
    padding: 0.75rem 1.5rem 1.5rem 1.5rem;
    max-height: 0;
    overflow: hidden;
    transition: max-height var(--transition-normal);
  }

  .nav-links.nav-open {
    max-height: 420px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.8);
  }

  .nav-links li {
    width: 100%;
    padding: 0.75rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  }

  .nav-links li:last-child { border-bottom: none; }

  .nav-links a {
    display: block;
    width: 100%;
  }

  .nav-links a.btn {
    margin-top: 0.5rem;
    text-align: center;
  }
}

/* HERO SECTION DE ALTO IMPACTO */
.hero {
  padding: 10.5rem 0 6rem 0;
  text-align: center;
  position: relative;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.625rem;
  padding: 0.45rem 1.15rem;
  background: rgba(139, 92, 246, 0.1);
  border: 1px solid rgba(139, 92, 246, 0.35);
  border-radius: var(--radius-full);
  color: var(--text-main);
  font-size: 0.875rem;
  font-weight: 600;
  margin-bottom: 2rem;
  box-shadow: 0 0 20px rgba(139, 92, 246, 0.15);
  backdrop-filter: blur(10px);
}

.hero-badge .status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: var(--success);
  box-shadow: 0 0 10px var(--success);
  animation: pulse-beacon 2s infinite;
}

@keyframes pulse-beacon {
  0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7); }
  70% { transform: scale(1.1); box-shadow: 0 0 0 8px rgba(16, 185, 129, 0); }
  100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

.hero h1 {
  font-size: 4rem;
  max-width: 900px;
  margin: 0 auto 1.5rem auto;
  letter-spacing: -0.04em;
  line-height: 1.1;
  font-weight: 800;
}

.hero p {
  font-size: 1.25rem;
  color: var(--text-muted);
  max-width: 680px;
  margin: 0 auto 2.75rem auto;
  line-height: 1.6;
}

@media (max-width: 768px) {
  .hero h1 { font-size: 2.5rem; }
  .hero p { font-size: 1.05rem; }
  .hero { padding: 7.5rem 0 4rem 0; }
}

/* CARRUSEL DE PORTFOLIO DE VANGUARDIA */
.section-title {
  text-align: center;
  margin-bottom: 3.5rem;
}

.section-title h2 {
  font-size: 2.5rem;
  letter-spacing: -0.03em;
  margin-bottom: 0.75rem;
}

.section-title p {
  color: var(--text-muted);
  font-size: 1.1rem;
  max-width: 600px;
  margin: 0 auto;
}

.carousel-container {
  position: relative;
  overflow: hidden;
  padding: 1rem 0 3rem 0;
}

.carousel-track {
  display: flex;
  gap: 1.75rem;
  transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.portfolio-card {
  min-width: 360px;
  max-width: 360px;
  background: var(--bg-surface);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  overflow: hidden;
  flex-shrink: 0;
  position: relative;
  transition: transform var(--transition-normal), border-color var(--transition-normal), box-shadow var(--transition-normal);
}

.portfolio-card::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.08) 0%, transparent 40%);
  pointer-events: none;
}

.portfolio-card:hover {
  transform: translateY(-6px);
  border-color: rgba(139, 92, 246, 0.5);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.6), 0 0 30px rgba(139, 92, 246, 0.25);
}

.portfolio-card img {
  width: 100%;
  height: 210px;
  object-fit: cover;
  border-bottom: 1px solid var(--border-subtle);
}

.portfolio-card-body {
  padding: 1.5rem;
}

.carousel-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.25rem;
  margin-top: 2rem;
}

.carousel-arrow {
  background: var(--bg-surface-elev);
  backdrop-filter: blur(12px);
  border: 1px solid var(--border-subtle);
  color: var(--text-main);
  width: 44px;
  height: 44px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  transition: all var(--transition-fast);
}

.carousel-arrow:hover {
  background: var(--primary);
  border-color: var(--primary);
  box-shadow: var(--shadow-glow);
  transform: scale(1.08);
}

.carousel-dots {
  display: flex;
  gap: 0.5rem;
}

.dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.15);
  cursor: pointer;
  transition: all var(--transition-normal);
}

.dot.active {
  background: var(--primary);
  width: 28px;
  border-radius: var(--radius-full);
  box-shadow: 0 0 12px var(--primary);
}

/* --- BENTO GRID VANGUARDISTA --- */
.bento-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 1.5rem;
}

.bento-col-4 { grid-column: span 4; }
.bento-col-6 { grid-column: span 6; }
.bento-col-8 { grid-column: span 8; }
.bento-col-12 { grid-column: span 12; }

@media (max-width: 900px) {
  .bento-col-4, .bento-col-6, .bento-col-8 {
    grid-column: span 12;
  }
}

.tech-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.35rem 0.75rem;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-sm);
  font-size: 0.8125rem;
  color: var(--text-muted);
  font-family: var(--font-mono);
  transition: all var(--transition-fast);
}

.tech-tag:hover {
  background: rgba(139, 92, 246, 0.15);
  border-color: var(--primary);
  color: var(--text-main);
  transform: translateY(-1px);
}
