/* ============================================================
   CENTINELA SMART — pages/home.css
   Estilos exclusivos de la página de inicio (index.html)
   ============================================================ */

/* ==================== HERO ==================== */

.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  position: relative;
  overflow: hidden;
  /* Efecto de luz cian en el fondo desde arriba-izquierda */
  background:
    radial-gradient(ellipse 80% 60% at 20% 20%, rgba(0, 245, 212, 0.06) 0%, transparent 60%),
    radial-gradient(ellipse 60% 80% at 80% 80%, rgba(26, 58, 110, 0.15) 0%, transparent 60%),
    var(--bg-deep);
}

/* Canvas de fondo: red de nodos animada (dibujada con JS en hero-canvas.js) */
.hero-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0.4;
  pointer-events: none; /* No interfiere con clics */
}

/* Destello central decorativo */
.hero-glow {
  position: absolute;
  top: 30%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(0, 245, 212, 0.06) 0%, transparent 70%);
  pointer-events: none;
  animation: pulse-glow 4s ease-in-out infinite;
}

@keyframes pulse-glow {
  0%, 100% { opacity: 0.5; transform: translate(-50%, -50%) scale(1); }
  50%       { opacity: 1;   transform: translate(-50%, -50%) scale(1.1); }
}

/* Contenido del hero centrado */
.hero-content {
  max-width: 700px;
  padding-top: var(--nav-height);
  position: relative;
  z-index: 2; /* Encima del canvas */
}

/* Etiqueta de estado del sistema */
.hero-tag {
  display: inline-flex;
  align-items: center;
  gap: var(--space-3);
  background: rgba(0, 245, 212, 0.06);
  border: 1px solid rgba(0, 245, 212, 0.15);
  border-radius: 100px;
  padding: 0.4rem 1rem;
  margin-bottom: var(--space-8);
}

/* Título principal: 3 líneas grandes */
.hero-title {
  font-size: clamp(2.8rem, 7vw, 5.5rem); /* clamp = se adapta al tamaño de pantalla */
  font-weight: 900;
  letter-spacing: -0.02em;
  line-height: 1.05;
  margin-bottom: var(--space-6);
  display: flex;
  flex-direction: column;
}

.hero-title-line {
  display: block;
  color: var(--text-primary);
}

/* La línea del medio tiene el acento cian con efecto neon */
.hero-title-accent {
  color: var(--cyan);
  text-shadow: 0 0 40px rgba(0, 245, 212, 0.5);
}

/* Subtítulo */
.hero-subtitle {
  font-size: var(--text-lg);
  color: var(--text-secondary);
  margin-bottom: var(--space-8);
  line-height: 1.7;
  max-width: 500px;
}

/* Contenedor de botones de acción */
.hero-actions {
  display: flex;
  gap: var(--space-4);
  flex-wrap: wrap;
  margin-bottom: var(--space-12);
}

/* Mini métricas en la parte baja del hero */
.hero-metrics {
  display: flex;
  align-items: center;
  gap: var(--space-8);
}

.hero-metric {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.hero-metric span:first-child {
  font-family: var(--font-mono);
  font-size: var(--text-lg);
  font-weight: 700;
}

.hero-metric span:last-child {
  font-size: var(--text-xs);
  color: var(--text-muted);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

/* Divisor vertical entre métricas */
.hero-metric-divider {
  width: 1px;
  height: 40px;
  background: var(--bg-border);
}

/* Flecha de scroll hacia abajo */
.hero-scroll-hint {
  position: absolute;
  bottom: 40px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
}

.scroll-arrow {
  width: 1px;
  height: 50px;
  background: linear-gradient(to bottom, var(--cyan), transparent);
  margin: 0 auto;
  animation: scroll-bounce 2s ease-in-out infinite;
}

@keyframes scroll-bounce {
  0%, 100% { transform: scaleY(1); opacity: 1; }
  50%       { transform: scaleY(0.5); opacity: 0.4; }
}

/* ==================== STATS ==================== */

.stats-section {
  padding: var(--space-16) 0;
  border-top: 1px solid var(--bg-border);
  border-bottom: 1px solid var(--bg-border);
  background: var(--bg-surface);
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
}

/* Divisor entre stats */
.stat-card:not(:last-child) {
  border-right: 1px solid var(--bg-border);
}

/* ==================== SERVICES SECTION ==================== */

.services-section {
  background: var(--bg-deep);
}

/* Encabezado de sección: centrado */
.section-header {
  text-align: center;
  max-width: 600px;
  margin: 0 auto var(--space-16);
}

.section-desc {
  margin-top: var(--space-4);
  font-size: var(--text-lg);
  color: var(--text-secondary);
  line-height: 1.7;
}

.services-grid {
  margin-top: 0;
}

/* ==================== FEATURED PROJECTS ==================== */

.featured-projects {
  background: var(--bg-surface);
}

/* Grid de 3 columnas para proyectos destacados */
.featured-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-6);
}

/* ==================== DIGITAL CTA ==================== */

.digital-cta-section {
  background: var(--bg-deep);
  overflow: hidden;
  position: relative;
}

/* Luz de fondo decorativa */
.digital-cta-section::before {
  content: '';
  position: absolute;
  bottom: -50%;
  right: -10%;
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(0, 245, 212, 0.05) 0%, transparent 70%);
  pointer-events: none;
}

/* Dos columnas: texto + terminal */
.digital-cta-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-16);
  align-items: center;
}

.digital-cta-text h2 {
  font-size: var(--text-3xl);
  margin-bottom: var(--space-4);
}

.digital-cta-text p {
  font-size: var(--text-lg);
  margin-bottom: var(--space-6);
}

/* Lista de features con check */
.digital-features {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.digital-features li {
  font-size: var(--text-base);
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: var(--space-3);
}

/* ==================== TERMINAL CARD ==================== */

/* Simula una ventana de terminal de Linux */
.terminal-card {
  background: #0a0f1a;
  border: 1px solid rgba(0, 245, 212, 0.15);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5), 0 0 40px rgba(0, 245, 212, 0.05);
}

/* Barra superior de la ventana con los 3 puntos */
.terminal-header {
  background: #060b14;
  padding: 0.75rem 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  border-bottom: 1px solid rgba(0, 245, 212, 0.08);
}

.terminal-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
}
.terminal-dot.red    { background: #ff5f57; }
.terminal-dot.yellow { background: #febc2e; }
.terminal-dot.green  { background: #28c840; }

.terminal-title {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  color: var(--text-muted);
  margin-left: var(--space-2);
}

/* Cuerpo de la terminal */
.terminal-body {
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.terminal-line {
  font-family: var(--font-mono);
  font-size: var(--text-sm);
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  align-items: center;
}

.t-prompt { color: var(--cyan); }
.t-cmd    { color: #e8f4f8; }
.t-arg    { color: #7a9bb5; }
.t-out    { color: var(--text-muted); padding-left: 1rem; }
.t-success{ color: #28c840; padding-left: 0; }

/* Cursor parpadeante al final */
.terminal-cursor {
  width: 8px;
  height: 16px;
  background: var(--cyan);
  display: inline-block;
  animation: blink 1s step-end infinite;
  margin-top: 0.3rem;
}

@keyframes blink {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0; }
}

/* ==================== FINAL CTA ==================== */

.final-cta {
  background: var(--bg-surface);
  text-align: center;
  border-top: 1px solid var(--bg-border);
}

.final-cta-content {
  max-width: 600px;
  margin: 0 auto;
}

.final-cta h2 {
  font-size: var(--text-3xl);
  margin-bottom: var(--space-4);
}

.final-cta p {
  font-size: var(--text-lg);
  color: var(--text-secondary);
}

/* ==================== RESPONSIVE ==================== */

@media (max-width: 1024px) {
  .digital-cta-inner { grid-template-columns: 1fr; gap: var(--space-8); }
  .featured-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 768px) {
  .hero-title { font-size: clamp(2.2rem, 10vw, 3rem); }
  .hero-actions { flex-direction: column; }
  .hero-metrics { gap: var(--space-4); }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .stat-card:nth-child(2) { border-right: 1px solid var(--bg-border); }
  .stat-card:nth-child(1),
  .stat-card:nth-child(2) { border-bottom: 1px solid var(--bg-border); }
  .stat-card:nth-child(3),
  .stat-card:nth-child(4) { border-right: none; }
  .featured-grid { grid-template-columns: 1fr; }
}
