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

/* FONDO BLUEPRINT GRID & ORBES DE LUZ AURORA (VIVO, PULSANTE Y DINÁMICO) */
.gradient-mesh {
  position: fixed;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
  background-image:
    radial-gradient(rgba(255, 255, 255, 0.12) 1.2px, transparent 1.2px),
    linear-gradient(to right, rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255, 255, 255, 0.035) 1px, transparent 1px);
  background-size: 32px 32px, 64px 64px, 64px 64px;
}

.mesh-light {
  position: absolute;
  border-radius: 50%;
  filter: blur(85px);
  pointer-events: none;
  opacity: 0.75;
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: transform, opacity;
  animation: aura-pulse 4.5s ease-in-out infinite alternate;
}

.mesh-light-a {
  width: 650px;
  height: 650px;
  top: -5%;
  left: 5%;
  background: radial-gradient(circle, rgba(99, 102, 241, 0.65) 0%, rgba(139, 92, 246, 0.4) 40%, transparent 70%);
  animation-duration: 4s;
}

.mesh-light-b {
  width: 600px;
  height: 600px;
  top: 30%;
  right: 0%;
  background: radial-gradient(circle, rgba(6, 182, 212, 0.6) 0%, rgba(14, 165, 233, 0.35) 40%, transparent 70%);
  animation-duration: 5.2s;
  animation-delay: -1.5s;
}

/* TERCER ORBE DE PROFUNDIDAD Y DINAMISMO */
.mesh-light-c {
  position: absolute;
  width: 550px;
  height: 550px;
  bottom: 0%;
  left: 15%;
  border-radius: 50%;
  filter: blur(95px);
  pointer-events: none;
  opacity: 0.65;
  background: radial-gradient(circle, rgba(168, 85, 247, 0.55) 0%, rgba(99, 102, 241, 0.3) 45%, transparent 70%);
  animation: aura-pulse 6s ease-in-out infinite alternate;
  animation-delay: -2.5s;
}

@keyframes aura-pulse {
  0% {
    transform: scale(0.85) translate(-15px, -15px);
    opacity: 0.5;
  }
  50% {
    transform: scale(1.18) translate(30px, -25px);
    opacity: 0.85;
  }
  100% {
    transform: scale(0.95) translate(-25px, 30px);
    opacity: 0.6;
  }
}

/* Fondos semitransparentes para las secciones */
.section-tinted {
  background-color: rgba(15, 23, 42, 0.4);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

.section-tinted-elev {
  background-color: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  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 {
  display: none;
}

.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(8, 12, 22, 0.75);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border-subtle);
  padding: 0.85rem 0;
  transition: all var(--transition-normal);
}

.navbar.scrolled {
  background-color: rgba(8, 12, 22, 0.9);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
}

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

.nav-brand span {
  color: var(--secondary);
  text-shadow: 0 0 16px rgba(6, 182, 212, 0.5);
}

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

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

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

.nav-links a.btn-primary {
  color: #ffffff !important;
  font-weight: 600 !important;
}

.nav-links a.btn-primary:hover {
  color: #ffffff !important;
}

.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(8, 12, 22, 0.98);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border-bottom: 1px solid var(--border-subtle);
    padding: 0 1.5rem;
    max-height: 0;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  }

  .nav-links.nav-open {
    max-height: 440px;
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    padding: 0.75rem 1.5rem 1.5rem 1.5rem;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.6);
  }

  .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 5.5rem 0;
  text-align: center;
  position: relative;
}

.hero h1 {
  font-family: var(--font-heading);
  margin-bottom: 1.5rem;
  color: #fff;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.35rem;
  width: 100%;
}

.hero-line-main {
  font-size: clamp(2.2rem, 6vw, 4.2rem);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.035em;
  color: #fff;
  display: block;
}

.hero-line-sub {
  font-size: clamp(1.45rem, 4.5vw, 3.4rem);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.025em;
  display: block;
  max-width: 100%;
}

.hero-cta-group {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.25rem;
  flex-wrap: wrap;
  width: 100%;
  max-width: 540px;
  margin: 0 auto;
}

.hero-cta-group .btn {
  font-size: 1.05rem;
  padding: 0.85rem 2rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}

@media (max-width: 480px) {
  .hero {
    padding: 6.5rem 0 3rem 0;
  }
  
  .hero-line-main {
    font-size: 1.95rem;
    line-height: 1.15;
  }

  .hero-line-sub {
    font-size: 1.35rem;
    line-height: 1.2;
  }

  .hero p {
    font-size: 0.925rem;
    margin-bottom: 1.75rem;
    padding: 0 0.5rem;
  }

  .hero-badge {
    margin-bottom: 1.25rem;
    font-size: 0.775rem;
    padding: 0.35rem 0.85rem;
  }

  .hero-cta-group {
    flex-direction: column;
    gap: 0.85rem;
    width: 100%;
    padding: 0 1rem;
  }

  .hero-cta-group .btn {
    width: 100%;
    padding: 0.85rem 1.25rem;
    font-size: 1rem;
  }
}

.hero p {
  font-size: clamp(1.05rem, 2vw, 1.25rem);
  color: var(--text-muted);
  max-width: 680px;
  margin: 0 auto 2.5rem auto;
  line-height: 1.6;
  font-weight: 400;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.625rem;
  padding: 0.5rem 1.25rem;
  background: rgba(99, 102, 241, 0.1);
  border: 1px solid rgba(99, 102, 241, 0.3);
  border-radius: var(--radius-full);
  color: #c7d2fe;
  box-shadow: 0 0 24px rgba(99, 102, 241, 0.25);
  font-size: 0.875rem;
  font-weight: 600;
  margin-bottom: 2rem;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.hero-badge .status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: var(--success);
  box-shadow: 0 0 12px 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); }
}

  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; }
}

@media (max-width: 400px) {
  .hero h1 { font-size: 2.05rem; }
}

/* 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;
  width: 100%;
  max-width: 100%;
  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 {
  width: 360px;
  max-width: calc(100vw - 2.5rem);
  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);
}

@media (max-width: 600px) {
  .portfolio-card {
    width: calc(100vw - 2.5rem);
    max-width: calc(100vw - 2.5rem);
  }
}

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

.portfolio-card:hover {
  transform: translateY(-6px);
  border-color: var(--primary);
  box-shadow: 0 20px 44px rgba(15, 23, 42, 0.14), 0 6px 16px rgba(14, 165, 233, 0.15);
}

.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);
  color: #fff;
}

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

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

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

/* --- 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(15, 23, 42, 0.04);
  border: 1px solid rgba(15, 23, 42, 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(14, 165, 233, 0.12);
  border-color: var(--primary);
  color: var(--text-main);
  transform: translateY(-1px);
}

/* --- ACCESIBILIDAD TÁCTIL EN MÓVIL (Mínimo 44px touch target) --- */
@media (max-width: 768px) {
  .nav-links a {
    min-height: 44px;
    display: flex;
    align-items: center;
  }
  .portfolio-card-body .btn-secondary {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.6rem 1rem !important;
  }
  footer a {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
  }
  .form-input, select.form-input {
    min-height: 46px;
  }
  .radio-card {
    min-height: 52px;
  }
}
