﻿/* --- [RESPONSIVE PATCH OLA 1 – HERO TIPOGRAFÍA & CTAs] ---
   Contexto: Hardening mobile, hero principal.
   - clamp() en .hero-title y .hero-lead para tamaño fluido
   - .hero-actions .btn y .hero-cta: width 100%, min-width 0, box-sizing border-box
   - .hero, .hero-superbox-metrics: padding/margin mobile para evitar overflow
   - No destructivo, solo override contextual
   - Documentado para trazabilidad
   ---------------------------------------------- */
@media (max-width: 600px) {
  .hero-title {
    font-size: clamp(1.5rem, 7vw, 2.2rem) !important;
    line-height: 1.15 !important;
    word-break: break-word !important;
  }
  .hero-lead {
    font-size: clamp(1rem, 4vw, 1.18rem) !important;
    line-height: 1.5 !important;
    word-break: break-word !important;
  }
  .hero-actions .btn,
  .hero-cta {
    width: 100% !important;
    min-width: 0 !important;
    box-sizing: border-box !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    display: block !important;
    text-align: center;
  }
  .hero {
    padding-left: clamp(12px, 4vw, 24px) !important;
    padding-right: clamp(12px, 4vw, 24px) !important;
  }
  .hero-superbox-metrics {
    margin-left: 0 !important;
    margin-right: 0 !important;
    overflow-x: auto !important;
  }
}
/* --- RESPONSIVE HARDENING OLA 1: MIN-WIDTH PROBLEMÁTICOS (360-412px) --- */
@media (max-width: 480px) {
  .hero-superbox-metrics .metric-card,
  .hero-actions .btn,
  .service-card,
  .plan-card,
  .content-card,
  .metric-card,
  .flow-card,
  .domain-card,
  .cap-card,
  .impact-card,
  .diagnostic-card,
  .story-card,
  .work-card {
    min-width: 0 !important;
  }
}
/* --- FIN OLA 1 MIN-WIDTH PROBLEMÁTICOS --- */
/* --- RESPONSIVE HARDENING OLA 1: CARDS BASE (360-412px) --- */
@media (max-width: 480px) {
  .service-card,
  .plan-card,
  .content-card,
  .metric-card,
  .flow-card,
  .domain-card,
  .cap-card,
  .impact-card,
  .diagnostic-card,
  .story-card,
  .work-card {
    width: 100% !important;
    min-width: 0 !important;
    box-sizing: border-box !important;
    padding-left: 4vw !important;
    padding-right: 4vw !important;
  }
}
/* --- FIN OLA 1 CARDS BASE --- */
/* ============================================
   LEAD & LEAD-STRONG (bloque reusable global)
   .lead: bajada de sección, color, tamaño, spacing
   .lead-strong: énfasis en lead
   No max-width ni overrides contextuales
============================================ */
.lead {
  margin: 0 0 16px;
  color: var(--gray);
  line-height: 1.82;
  font-size: 1.07rem;
  text-align: justify;
}

.lead-strong {
  color: var(--white);
  font-weight: 700;
}
/* ========================================
   ADN VISUAL COMÚN CARDS (consolidado)
   Solo visual base, sin layout/contexto
   No tocar nombres de clase usados por JS
   ----------------------------------------
   Incluye: .service-card, .story-card, .plan-card, .model-card, .result-card, .contact-card, .metric-card, .impact-card, .cap-card, .domain-card, .diagnostic-card, .flow-card, .content-card
   ----------------------------------------
*/
.service-card,
.story-card,
.plan-card,
.model-card,
.result-card,
.contact-card,
.metric-card,
.impact-card,
.cap-card,
.domain-card,
.diagnostic-card,
.flow-card,
.content-card {
  background: linear-gradient(180deg, var(--panel), var(--panel2));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  transition: all 0.3s ease;
  padding: 24px;
}

.service-card,
.story-card,
.plan-card,
.content-card {
  /* padding consolidado arriba */
}

.model-card,
.impact-card,
.flow-card,
.cap-card,
.domain-card,
.diagnostic-card {
  padding: 15px;
}

.result-card {
  padding: 22px;
  text-align: center;
}

.contact-card {
  padding: 24px;
  display: grid;
  gap: 14px;
}

.metric-card {
  padding: 10px 8px;
}

/* Estados hover base (solo visual, sin contexto) */
.service-card:hover,
.story-card:hover,
.plan-card:hover,
.model-card:hover,
.result-card:hover,
.contact-card:hover,
.impact-card:hover,
.cap-card:hover,
.domain-card:hover,
.diagnostic-card:hover,
.flow-card:hover,
.content-card:hover {
  border-color: var(--lineStrong);
  box-shadow: var(--glow-turq), var(--shadow);
  transform: translateY(-3px);
}

/* ============================================
   6. BUTTONS (Fuente de verdad consolidada)
   ============================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  border-radius: 14px;
  padding: 13px 18px;
  transition: .25s ease;
}

.btn-primary {
  background: linear-gradient(135deg, var(--turq), var(--turq2));
  color: #0A1A2F;
  box-shadow: var(--shadow-soft);
  text-align: center;
}

.btn-secondary,
.btn-outline {
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.02);
  color: var(--white);
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 15px 40px rgba(94, 208, 200, 0.35);
}

.btn-secondary:hover,
.btn-outline:hover {
  border-color: var(--lineStrong);
  background: rgba(255, 255, 255, 0.05);
}

.btn-nav {
  background: linear-gradient(135deg, var(--turq), var(--turq2));
  color: #0A1A2F;
  box-shadow: var(--shadow-soft);
  border-color: transparent;
  padding: 10px 16px;
}

.btn-nav:hover {
  transform: translateY(-1px);
  box-shadow: 0 15px 40px rgba(94, 208, 200, 0.35);
  background: linear-gradient(135deg, var(--turq2), var(--turq));
  border-color: transparent;
}

/* Tamaños y variantes adicionales */
.btn-sm {
  padding: 10px 16px;
  font-size: var(--text-sm);
}

.btn-lg {
  padding: 16px 28px;
  font-size: var(--text-lg);
}

.btn-full {
  width: 100%;
  justify-content: center;
}

.btn-success {
  background: linear-gradient(135deg, var(--success), #22c55e);
  color: #042f1e;
}

.btn-ghost {
  background: transparent;
  border: 1px solid transparent;
  color: var(--turquoise-main);
}

.btn-ghost:hover {
  background: rgba(94, 208, 200, 0.08);
  border-color: var(--border-brand);
}

/* Documentación: Todas las reglas .btn* viven aquí salvo overrides hero. */

.btn-primary {
  background: linear-gradient(135deg, var(--turq), var(--turq2));
  color: #082039;
  box-shadow: 0 10px 30px rgba(94, 208, 200, 0.24);
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 15px 40px rgba(94, 208, 200, 0.35);
}

.btn-secondary,
.btn-outline {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--lineStrong);
  color: var(--white);
}

.btn-secondary:hover,
.btn-outline:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: var(--turq);
}

.btn-nav {
  padding: 10px 16px;
  background: linear-gradient(135deg, var(--turq), var(--turq2));
  color: #082039;
  box-shadow: 0 10px 30px rgba(94, 208, 200, 0.24);
}


/* ============================================
   19. ANIMATIONS
   ============================================ */

/* ============================================
   REVEAL ANIMATION (fuente de verdad global)
   .reveal: estado base oculto
   .reveal.in: estado visible (canónico)
  /* DEPRECATED — eliminar en próxima fase */
  .reveal.visible: alias temporal (compatibilidad)
   .delay-1, .delay-2: delays globales
   No modificar ni duplicar en otros CSS
============================================ */
.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.75s ease, transform 0.75s ease;
}

.reveal.in,
/* DEPRECATED — eliminar en próxima fase */
.reveal.visible {
  opacity: 1;
  transform: none;
}

/* Alias temporal: .reveal.visible (deprecado, usar .in) */

.delay-1 {
  transition-delay: 0.08s;
}

.delay-2 {
  transition-delay: 0.16s;
}

.team-section {
    margin: 20px 0;
    padding: 10px 0;
}

.delay-1 {
  transition-delay: 0.08s;
}

.delay-2 {
  transition-delay: 0.16s;
}

.delay-3 {
  transition-delay: 0.24s;
}

/* ============================================
   NEXORA COMPONENT SYSTEM
   Reusable UI Components for Professional Consulting
   ============================================ */

/* ========================================
   BUTTON COMPONENTS
   ======================================== */

/* Button Sizes */
.btn-sm {
  padding: 10px 16px;
  font-size: var(--text-sm);
}

.btn-lg {
  padding: 16px 28px;
  font-size: var(--text-lg);
}

.btn-full {
  width: 100%;
  justify-content: center;
}

/* Button Variants */
.btn-success {
  background: linear-gradient(135deg, var(--success), #22c55e);
  color: #042f1e;
}

.btn-ghost {
  background: transparent;
  border: 1px solid transparent;
  color: var(--turquoise-main);
}

.btn-ghost:hover {
  background: rgba(94, 208, 200, 0.08);
  border-color: var(--border-brand);
}

/* ========================================
   CARD COMPONENTS
   ======================================== */

/* Base Card */
.card {
  background: var(--gradient-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-3xl);
  box-shadow: var(--shadow-premium);
  padding: var(--space-lg);
  transition: all var(--duration-slow) var(--ease-smooth);
}

.card:hover {
  border-color: var(--border-brand);
  box-shadow: var(--glow-medium), var(--shadow-premium);
  transform: translateY(-6px);
  background: var(--gradient-card-hover);
}

/* Card with Icon */
.card-icon {
  display: flex;
  align-items: flex-start;
  gap: var(--space-md);
}

.card-icon .icon {
  flex-shrink: 0;
  width: 48px;
  height: 48px;
  display: inline-grid;
  place-items: center;
  background: rgba(94, 208, 200, 0.12);
  border: 1px solid var(--border-brand);
  border-radius: var(--radius-lg);
  font-size: var(--text-2xl);
}

/* Elevated Card (Premium) */
.card-elevated {
  box-shadow: var(--shadow-premium), var(--glow-subtle);
  border-color: var(--border-light);
}

.card-elevated:hover {
  box-shadow: var(--shadow-premium), var(--glow-strong);
  transform: translateY(-6px) scale(1.02);
}

/* Compact Card */
.card-compact {
  padding: var(--space-md);
  border-radius: var(--radius-lg);
}

/* ========================================
   METRIC COMPONENTS
   (For Results/Stats Display)
   ======================================== */

.metric-card {
  background: var(--gradient-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-2xl);
  padding: 8px 4px;
  text-align: center;
  transition: all var(--duration-slow) var(--ease-smooth);
}

/*
.metric-card:hover {
  border-color: var(--turquoise-main);
  box-shadow: var(--glow-strong), var(--shadow-strong);
  transform: translateY(-8px) scale(1.05);
  background: var(--gradient-card-hover);
}
*/

.metric-value {
  display: block;
  font-size: var(--text-6xl);
  font-weight: var(--weight-extrabold);
  line-height: var(--leading-tight);
  color: var(--turquoise-main);
  margin-bottom: var(--space-sm);
  text-shadow: 0 0 20px rgba(94, 208, 200, 0.3);
}

.metric-label {
  display: block;
  font-size: var(--text-base);
  color: var(--gray-neutral);
  font-weight: var(--weight-medium);
}

.metric-description {
  display: block;
  font-size: var(--text-sm);
  color: var(--gray-medium);
  margin-top: var(--space-xs);
  line-height: var(--leading-relaxed);
}

/* ========================================
   TAG/BADGE COMPONENTS
   ======================================== */

.tag {
  display: inline-flex;
  align-items: center;
  gap: var(--space-xs);
  padding: 6px 12px;
  border-radius: var(--radius-full);
  font-size: var(--text-xs);
  font-weight: var(--weight-bold);
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.tag-primary {
  background: rgba(94, 208, 200, 0.15);
  color: var(--turquoise-glow);
  border: 1px solid var(--border-brand);
}

.tag-success {
  background: rgba(74, 222, 128, 0.15);
  color: var(--success);
  border: 1px solid rgba(74, 222, 128, 0.3);
}

.tag-warning {
  background: rgba(251, 191, 36, 0.15);
  color: var(--warning);
  border: 1px solid rgba(251, 191, 36, 0.3);
}

.tag-featured {
  background: linear-gradient(135deg, rgba(94, 208, 200, 0.2), rgba(138, 230, 221, 0.15));
  color: var(--turquoise-main);
  border: 1px solid var(--border-brand);
  box-shadow: var(--glow-subtle);
}

/* ========================================
   SERVICE BOX COMPONENT (Enhanced)
   ======================================== */

.service-box-enhanced {
  background: var(--gradient-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-2xl);
  padding: var(--space-xl);
  margin: 20px;
  transition: all var(--duration-slow) var(--ease-smooth);
  position: relative;
  overflow: hidden;
}

.service-box-enhanced::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--gradient-primary);
  opacity: 0;
  transition: opacity var(--duration-normal) var(--ease-out);
}

.service-box-enhanced:hover::before {
  opacity: 1;
}

.service-box-enhanced:hover {
  border-color: var(--lineStrong);
  box-shadow: var(--glow-turq), var(--shadow);
  transform: translateY(-2px);
}

.service-header {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  margin-bottom: var(--space-md);
}

.service-icon {
  font-size: var(--text-4xl);
}

.service-title {
  font-size: var(--text-xl);
  font-weight: var(--weight-bold);
  margin: 0;
  color: var(--white-soft);
}

.service-description {
  color: var(--gray-neutral);
  line-height: var(--leading-relaxed);
  margin-bottom: var(--space-md);
}

.service-features {
  list-style: none;
  padding: 0;
  margin: 0;
}

.service-features li {
  padding: var(--space-xs) 0;
  color: var(--gray-neutral);
  display: flex;
  align-items: flex-start;
  gap: var(--space-sm);
}

.service-features li::before {
  content: "Ô£ô";
  color: var(--turquoise-main);
  font-weight: var(--weight-bold);
  flex-shrink: 0;
}

/* ========================================
   TESTIMONIAL COMPONENT
   ======================================== */

.testimonial-card {
  background: var(--gradient-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-2xl);
  padding: var(--space-2xl);
  position: relative;
}

.testimonial-card::before {
  content: '"';
  position: absolute;
  top: var(--space-lg);
  left: var(--space-lg);
  font-size: 5rem;
  color: var(--turquoise-main);
  opacity: 0.15;
  line-height: 1;
  font-family: Georgia, serif;
}

.testimonial-text {
  font-size: var(--text-lg);
  line-height: var(--leading-relaxed);
  color: var(--white-soft);
  margin-bottom: var(--space-lg);
  position: relative;
  z-index: 1;
}

.testimonial-author {
  display: flex;
  align-items: center;
  gap: var(--space-md);
}

.author-name {
  font-weight: var(--weight-bold);
  color: var(--white-soft);
}

.author-role {
  font-size: var(--text-sm);
  color: var(--gray-neutral);
}

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

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: var(--space-lg);
}

.stat-item {
  text-align: center;
}

.stat-icon {
  font-size: var(--text-4xl);
  display: block;
  margin-bottom: var(--space-sm);
  opacity: 0.9;
}

.stat-number {
  font-size: var(--text-5xl);
  font-weight: var(--weight-extrabold);
  color: var(--turquoise-main);
  line-height: var(--leading-tight);
  text-shadow: 0 0 20px rgba(94, 208, 200, 0.3);
}

.stat-label {
  display: block;
  margin-top: var(--space-sm);
  font-size: var(--text-base);
  color: var(--gray-neutral);
}

.metric-description {
  display: block;
  margin-top: var(--space-xs);
  font-size: var(--text-sm);
  color: var(--gray-medium);
  font-style: italic;
}

/* ========================================
   UTILITY CLASSES
   ======================================== */

/* Spacing Utilities */
.mt-xs { margin-top: var(--space-xs); }
.mt-sm { margin-top: var(--space-sm); }
.mt-md { margin-top: var(--space-md); }
.mt-lg { margin-top: var(--space-lg); }
.mt-xl { margin-top: var(--space-xl); }
.mt-2xl { margin-top: var(--space-2xl); }

.mb-xs { margin-bottom: var(--space-xs); }
.mb-sm { margin-bottom: var(--space-sm); }
.mb-md { margin-bottom: var(--space-md); }
.mb-lg { margin-bottom: var(--space-lg); }
.mb-xl { margin-bottom: var(--space-xl); }
.mb-2xl { margin-bottom: var(--space-2xl); }

/* Text Utilities */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.text-turquoise { color: var(--turquoise-main); }
.text-muted { color: var(--gray-neutral); }
.text-white { color: var(--white-soft); }

.text-bold { font-weight: var(--weight-bold); }
.text-semibold { font-weight: var(--weight-semibold); }
.text-medium { font-weight: var(--weight-medium); }

/* Display Utilities */
.flex { display: flex; }
.inline-flex { display: inline-flex; }
.grid { display: grid; }
.hidden { display: none; }

/* Flex Utilities */
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.items-start { align-items: flex-start; }
.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }
.gap-sm { gap: var(--space-sm); }
.gap-md { gap: var(--space-md); }
.gap-lg { gap: var(--space-lg); }

/* Responsive Show/Hide */
@media (max-width: 820px) {
  .hide-mobile { display: none !important; }
}

@media (min-width: 821px) {
  .show-mobile { display: none !important; }
}

/* ============================================

/* ============================================
   BACK TO TOP BUTTON
   ============================================ */
.back-to-top {
  position: fixed;
  bottom: 104px;
  right: 28px;
  width: 44px;
  height: 44px;
  background: rgba(12, 44, 74, 0.85);
  border: 1px solid rgba(31, 182, 201, 0.35);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 999;
  color: var(--turquoise-main);
  opacity: 0;
  pointer-events: none;
  transform: translateY(8px);
  transition: opacity 0.3s ease, transform 0.3s ease, background 0.2s ease, border-color 0.2s ease;
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}

.back-to-top.visible {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.back-to-top:hover {
  background: rgba(31, 182, 201, 0.18);
  border-color: var(--turquoise-main);
  transform: translateY(-3px);
}

.back-to-top svg {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  color: var(--turquoise-main);
  fill: none;
  stroke: currentColor;
  stroke-width: 2.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.back-to-top svg polyline,
.back-to-top svg path {
  stroke: currentColor;
  fill: none;
}

@media (max-width: 640px) {
  .back-to-top {
    bottom: 96px;
    right: 16px;
    width: 38px;
    height: 38px;
  }
}
