/* styles.css */
:root {
  --bg-primary: #FFFFFF;
  --bg-secondary: #F8FAFC;
  --bg-tertiary: #F1F5F9;

  --primary-500: #2E6331;
  --primary-400: #428246;
  --primary-600: #1C401E;

  --accent-yellow: #F4D03F;
  --accent-yellow-dark: #D4AC0D;

  --text-primary: #0F172A;
  --text-secondary: #475569;

  --glass-bg: rgba(255, 255, 255, 0.85);
  --glass-border: rgba(15, 23, 42, 0.08);
  --glass-shadow: rgba(0, 0, 0, 0.05);

  --accent-glow: rgba(244, 208, 63, 0.3);
  --primary-glow: rgba(46, 99, 49, 0.2);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Inter', sans-serif;
  background-color: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  overflow-x: hidden;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-weight: 800;
  letter-spacing: -0.02em;
}

#particles-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: -1;
  pointer-events: none;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

.text-gradient {
  background: linear-gradient(135deg, var(--primary-500), var(--primary-400));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.text-accent {
  color: var(--accent-yellow-dark);
}

.navbar {
  position: fixed;
  top: 0;
  width: 100%;
  padding: 20px 0;
  z-index: 100;
  transition: all 0.3s ease;
  border-bottom: 1px solid transparent;
}

.navbar.scrolled {
  background: var(--glass-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--glass-border);
  box-shadow: 0 4px 20px var(--glass-shadow);
  padding: 15px 0;
}

.nav-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-weight: 800;
  font-size: 1.25rem;
  color: var(--text-primary);
}

.logo img {
  height: 120px;
  width: auto;
  object-fit: contain;
}

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

.nav-links a {
  text-decoration: none;
  color: var(--text-primary);
  font-weight: 600;
  font-size: 0.95rem;
  transition: color 0.3s;
}

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

.mobile-menu-btn {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  flex-direction: column;
  gap: 5px;
}

.mobile-menu-btn span {
  display: block;
  width: 24px;
  height: 2px;
  background-color: var(--text-primary);
  transition: 0.3s;
}

.btn-primary,
.btn-outline {
  display: inline-block;
  padding: 14px 28px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 600;
  font-size: 1rem;
  transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  font-family: 'Inter', sans-serif;
}

@keyframes pulse-glow {
  0% {
    box-shadow: 0 0 20px var(--primary-glow);
  }

  50% {
    box-shadow: 0 0 35px var(--primary-glow), 0 0 15px var(--accent-glow);
  }

  100% {
    box-shadow: 0 0 20px var(--primary-glow);
  }
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary-500), var(--primary-400));
  color: #FFF;
  border: 1px solid var(--primary-400);
  box-shadow: 0 10px 20px var(--primary-glow);
  position: relative;
  overflow: hidden;
  animation: pulse-glow 3s infinite;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 15px 30px var(--primary-glow), 0 0 15px var(--accent-glow);
}

.btn-outline {
  background: transparent;
  color: var(--primary-600);
  border: 2px solid var(--primary-500);
}

.btn-outline:hover {
  background: var(--bg-tertiary);
  border-color: var(--primary-600);
  color: var(--primary-600);
  transform: translateY(-2px);
}

.btn-sm {
  padding: 10px 20px;
  font-size: 0.9rem;
}

.btn-large {
  padding: 18px 40px;
  font-size: 1.1rem;
}

.hero {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  max-width: 1200px;
  margin: 0 auto;
  padding: 100px 24px 0;
  gap: 40px;
}

.hero-content h1 {
  font-size: 4rem;
  line-height: 1.1;
  margin-bottom: 24px;
  color: var(--text-primary);
}

.hero-content p {
  font-size: 1.25rem;
  color: var(--text-secondary);
  margin-bottom: 40px;
  max-width: 500px;
}

.hero-buttons {
  display: flex;
  gap: 16px;
}

.hero-visual {
  position: relative;
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
}

.hero-visual img {
  width: 100%;
  max-width: 600px;
  border-radius: 20px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.15);
}

.floating {
  animation: float 6s ease-in-out infinite;
}

.glow-bg {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 300px;
  height: 300px;
  background: radial-gradient(circle, var(--primary-400) 0%, transparent 70%);
  filter: blur(60px);
  opacity: 0.2;
  z-index: -1;
  border-radius: 50%;
}

@keyframes float {
  0% {
    transform: translateY(0px);
  }

  50% {
    transform: translateY(-20px);
  }

  100% {
    transform: translateY(0px);
  }
}

.metrics-section {
  padding: 80px 0;
  background: var(--bg-secondary);
  border-top: 1px solid var(--glass-border);
  border-bottom: 1px solid var(--glass-border);
}

.metrics-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px;
  text-align: center;
}

.metric-card h2 {
  font-size: 3.5rem;
  display: inline-block;
  color: var(--text-primary);
}

.metric-card span {
  font-size: 3.5rem;
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-weight: 800;
  color: var(--primary-500);
}

.metric-card p {
  color: var(--text-secondary);
  font-weight: 600;
  font-size: 1.1rem;
}

.services-section {
  padding: 120px 0;
}

.section-header {
  text-align: center;
  max-width: 600px;
  margin: 0 auto 60px;
}

.section-header h2 {
  font-size: 2.5rem;
  margin-bottom: 16px;
}

.section-header p {
  color: var(--text-secondary);
  font-size: 1.1rem;
}

.services-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 30px;
}

.flip-card {
  perspective: 1000px;
  height: 400px;
  border-radius: 20px;
  cursor: pointer;
  outline: none;
}

.flip-card-inner {
  position: relative;
  width: 100%;
  height: 100%;
  transition: transform 0.8s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  transform-style: preserve-3d;
  border-radius: 20px;
  box-shadow: 0 10px 30px var(--glass-shadow);
}

.flip-card:hover .flip-card-inner,
.flip-card:focus .flip-card-inner,
.flip-card.active .flip-card-inner {
  transform: rotateY(180deg);
}

.flip-card-front,
.flip-card-back {
  position: absolute;
  width: 100%;
  height: 100%;
  backface-visibility: hidden;
  border-radius: 20px;
  overflow: hidden;
}

.flip-card-front {
  background: var(--bg-tertiary);
}

.flip-card-front img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.9;
  transition: opacity 0.3s;
}

.flip-card-front::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.7) 0%, rgba(0, 0, 0, 0.1) 100%);
}

.front-content {
  position: absolute;
  bottom: 30px;
  left: 30px;
  z-index: 2;
}

.front-content h3 {
  font-size: 1.8rem;
  color: #FFFFFF;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

.flip-card-back {
  background: var(--glass-bg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--glass-border);
  transform: rotateY(180deg);
  padding: 40px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  box-shadow: inset 0 0 20px rgba(46, 99, 49, 0.05);
}

.flip-card-back h3 {
  font-size: 1.8rem;
  margin-bottom: 16px;
  color: var(--primary-600);
}

.flip-card-back p {
  color: var(--text-secondary);
  font-size: 1.1rem;
  margin-bottom: 24px;
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: auto;
}

.tags span {
  background: rgba(46, 99, 49, 0.1);
  border: 1px solid rgba(46, 99, 49, 0.2);
  color: var(--primary-500);
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 600;
}

.cta-section {
  padding: 100px 0;
  background: var(--bg-secondary);
  position: relative;
}

.cta-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--glass-border), transparent);
}

.cta-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
}

.cta-text h2 {
  font-size: 3rem;
  margin-bottom: 24px;
}

.cta-text p {
  font-size: 1.15rem;
  color: var(--text-secondary);
  margin-bottom: 30px;
}

.contact-info p {
  font-size: 1rem;
  color: var(--text-primary);
  margin-bottom: 10px;
}

.cta-form-wrapper {
  background: var(--glass-bg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--glass-border);
  border-radius: 20px;
  padding: 40px;
  box-shadow: 0 10px 40px var(--glass-shadow);
}

.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  font-weight: 600;
  margin-bottom: 8px;
  color: var(--text-primary);
  font-size: 0.95rem;
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 14px 16px;
  border: 1px solid var(--glass-border);
  border-radius: 8px;
  background: var(--bg-primary);
  color: var(--text-primary);
  font-family: 'Inter', sans-serif;
  font-size: 1rem;
  transition: all 0.3s ease;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--primary-400);
  box-shadow: 0 0 0 3px var(--primary-glow);
}

.btn-submit {
  width: 100%;
  margin-top: 10px;
  cursor: pointer;
  border: none;
}

footer {
  background: var(--bg-primary);
  padding: 60px 0 30px;
  border-top: 1px solid var(--glass-border);
}

.footer-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px 40px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--glass-border);
}

.footer-logo {
  height: 65px;
  width: auto;
  object-fit: contain;
}

.footer-brand p {
  color: var(--text-secondary);
  margin-top: 16px;
  max-width: 300px;
}

.footer-links {
  display: flex;
  gap: 24px;
}

.footer-links a {
  color: var(--text-secondary);
  text-decoration: none;
  transition: color 0.3s;
  font-weight: 500;
}

.footer-links a:hover {
  color: var(--primary-500);
}

.copyright {
  text-align: center;
  color: var(--text-secondary);
  margin-top: 30px;
  font-size: 0.9rem;
}

.fade-in-up {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.fade-in-up.visible {
  opacity: 1;
  transform: translateY(0);
}

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

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

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

@media (max-width: 968px) {
  .hero {
    grid-template-columns: 1fr;
    text-align: center;
    padding-top: 120px;
  }

  .hero-content h1 {
    font-size: 3rem;
  }

  .hero-content p {
    margin: 0 auto 30px;
  }

  .hero-buttons {
    justify-content: center;
  }

  .metrics-grid {
    grid-template-columns: 1fr;
  }

  .services-grid {
    grid-template-columns: 1fr;
  }

  .cta-container {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .nav-links {
    position: fixed;
    top: 70px;
    left: 0;
    right: 0;
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    flex-direction: column;
    padding: 30px;
    gap: 20px;
    border-bottom: 1px solid var(--glass-border);
    clip-path: circle(0% at top right);
    transition: clip-path 0.5s ease-in-out;
  }

  .nav-links.active {
    clip-path: circle(150% at top right);
  }

  .mobile-menu-btn {
    display: flex;
  }

  .footer-container {
    flex-direction: column;
    text-align: center;
    gap: 30px;
  }

  .footer-brand p {
    margin: 16px auto 0;
  }
}

@media (max-width: 576px) {
  .hero-content h1 {
    font-size: 2.5rem;
  }

  .cta-text h2 {
    font-size: 2.2rem;
  }

  .flip-card {
    height: 350px;
  }

  .logo img {
    height: 45px;
  }

  .footer-logo {
    height: 50px;
  }
}

/* =========================================
   HERO SVG ANIMATION (BionicSmart Flow)
========================================= */

.svg-wrapper {
  width: 100%;
  max-width: 600px;
  aspect-ratio: 1 / 1;
  background: radial-gradient(circle at center, #111827 0%, #030712 100%);
  border: 1px solid var(--glass-border);
  border-radius: 20px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.15);
  overflow: hidden;
  position: relative;
  display: block;
}

/* Líneas de flujo constantes */
.bg-path {
  stroke-dasharray: 6 6;
  animation: flowDash 20s linear infinite;
}
@keyframes flowDash {
  to { stroke-dashoffset: -200; }
}

/* Elementos que viajan por las líneas (Data Packets) */
.packet {
  offset-anchor: 50% 50%;
}

/* 1. Formulario -> Splitter */
.p1 { 
  offset-path: path('M 320 90 L 320 140'); 
  animation: move1 9s infinite ease-in-out; 
}
@keyframes move1 {
  0% { offset-distance: 0%; opacity: 0; transform: scale(0.5); }
  2% { opacity: 1; transform: scale(1); }
  10% { offset-distance: 100%; opacity: 1; transform: scale(1); }
  11% { opacity: 0; transform: scale(0.5); }
  100% { opacity: 0; }
}

/* Pulso Splitter */
.ring-router {
  transform-origin: 0 0;
  animation: pulseRouter 9s infinite;
}
@keyframes pulseRouter {
  0%, 11%, 100% { transform: scale(1); opacity: 0; stroke-width: 2px; }
  12% { transform: scale(1); opacity: 1; stroke-width: 4px; }
  18% { transform: scale(1.6); opacity: 0; stroke-width: 0px; }
}

/* 2. Splitter -> Slack (4 ramas) */
.p2-1 { offset-path: path('M 320 200 C 320 240, 110 240, 110 270'); animation: move2 9s infinite ease-in-out; }
.p2-2 { offset-path: path('M 320 200 C 320 240, 250 240, 250 270'); animation: move2 9s infinite ease-in-out; }
.p2-3 { offset-path: path('M 320 200 C 320 240, 390 240, 390 270'); animation: move2 9s infinite ease-in-out; }
.p2-4 { offset-path: path('M 320 200 C 320 240, 530 240, 530 270'); animation: move2 9s infinite ease-in-out; }
@keyframes move2 {
  0%, 14% { offset-distance: 0%; opacity: 0; transform: scale(0.5); }
  15% { opacity: 1; transform: scale(1); }
  25% { offset-distance: 100%; opacity: 1; transform: scale(1); }
  26% { opacity: 0; transform: scale(0.5); }
  100% { opacity: 0; }
}

/* Pulso Slack */
.ring-slack {
  transform-origin: 0 0;
  animation: pulseSlack 9s infinite;
}
@keyframes pulseSlack {
  0%, 25%, 100% { transform: scale(1); opacity: 0; stroke-width: 2px; }
  26% { transform: scale(1); opacity: 1; stroke-width: 4px; }
  32% { transform: scale(1.4); opacity: 0; stroke-width: 0px; }
}

/* 3. Slack -> Calendar */
.p3-1 { offset-path: path('M 110 330 C 110 400, 320 400, 320 430'); animation: move3 9s infinite ease-in-out; }
.p3-2 { offset-path: path('M 250 330 C 250 400, 320 400, 320 430'); animation: move3 9s infinite ease-in-out; }
.p3-3 { offset-path: path('M 390 330 C 390 400, 320 400, 320 430'); animation: move3 9s infinite ease-in-out; }
.p3-4 { offset-path: path('M 530 330 C 530 400, 320 400, 320 430'); animation: move3 9s infinite ease-in-out; }
@keyframes move3 {
  0%, 34% { offset-distance: 0%; opacity: 0; transform: scale(0.5); }
  35% { opacity: 1; transform: scale(1); }
  45% { offset-distance: 100%; opacity: 1; transform: scale(1); }
  46% { opacity: 0; transform: scale(0.5); }
  100% { opacity: 0; }
}

/* Pulso Calendar */
.ring-cal {
  transform-origin: 0 0;
  animation: pulseCal 9s infinite;
}
@keyframes pulseCal {
  0%, 45%, 100% { transform: scale(1); opacity: 0; stroke-width: 2px; }
  46% { transform: scale(1); opacity: 1; stroke-width: 4px; }
  52% { transform: scale(1.6); opacity: 0; stroke-width: 0px; }
}

/* 4. Calendar -> Meet */
.p4 { offset-path: path('M 320 490 L 320 540'); animation: move4 9s infinite ease-in-out; }
@keyframes move4 {
  0%, 54% { offset-distance: 0%; opacity: 0; transform: scale(0.5); }
  55% { opacity: 1; transform: scale(1); }
  65% { offset-distance: 100%; opacity: 1; transform: scale(1); }
  66% { opacity: 0; transform: scale(0.5); }
  100% { opacity: 0; }
}

/* Pulso Meet */
.ring-meet {
  transform-origin: 0 0;
  animation: pulseMeet 9s infinite;
}
@keyframes pulseMeet {
  0%, 65%, 100% { transform: scale(1); opacity: 0; stroke-width: 2px; }
  66% { transform: scale(1); opacity: 1; stroke-width: 4px; }
  76% { transform: scale(1.6); opacity: 0; stroke-width: 0px; }
}

/* Utilidad para etiquetas limpias sobre líneas */
.clean-text {
  paint-order: stroke fill;
  stroke: #111827;
  stroke-width: 6px;
  stroke-linecap: round;
  stroke-linejoin: round;
}