/* Variables y base */
:root {
  --bg: #11263d;
  --bg-alt: #1a3551;
  --card: #1d3e5f;
  --surface: #142a44;
  --light: #f3f6fb;
  --text: #eef2f8;
  --muted: #d5deed;
  --accent: #14b866;
  --accent-strong: #12a45b;
  --border: rgba(255, 255, 255, 0.06);
  --shadow: 0 15px 45px rgba(0, 0, 0, 0.28);
  --font: 'Inter', 'Manrope', 'Segoe UI', system-ui, -apple-system, sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
  text-decoration: none;
}

p {
  margin: 0 0 1rem 0;
}

h1, h2, h3, h4 {
  margin: 0 0 0.5rem 0;
  font-weight: 700;
}

.section {
  padding: 5rem 6vw;
}

.section-header {
  max-width: 840px;
  margin: 0 auto 3rem auto;
  text-align: center;
}

.section-header p {
  color: var(--muted);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.9rem 1.3rem;
  border-radius: 999px;
  border: 1px solid transparent;
  font-weight: 700;
  transition: transform 0.2s ease, box-shadow 0.3s ease, background 0.3s ease, color 0.3s ease, border-color 0.3s ease;
  cursor: pointer;
}

.btn.primary {
  background: linear-gradient(120deg, var(--accent), var(--accent-strong));
  color: #0a1928;
  box-shadow: var(--shadow);
}

.btn.primary:hover {
  transform: translateY(-1px) scale(1.01);
  box-shadow: 0 20px 55px rgba(0, 0, 0, 0.45);
}

.btn.ghost {
  border-color: rgba(255, 255, 255, 0.25);
  color: var(--text);
  background: transparent;
}

.btn.ghost:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.btn.full {
  width: 100%;
}

.centered {
  text-align: center;
}

.placeholder {
  background: linear-gradient(135deg, rgba(255,255,255,0.08), rgba(255,255,255,0.02));
  border: 1px solid var(--border);
}

/* Animaciones sutiles */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(18px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes floatPulse {
  0% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
  100% { transform: translateY(0); }
}

/* Navbar */
.navbar {
  position: sticky;
  top: 0;
  z-index: 10;
  backdrop-filter: blur(16px);
  background: #f6f8fc;
  border-bottom: 1px solid rgba(17, 42, 67, 0.08);
}

.nav-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.9rem 6vw;
  gap: 1rem;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
}

.logo img {
  height: 40px;
  width: auto;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 0.8rem;
}

.nav-links a {
  padding: 0.4rem 0.9rem;
  border-radius: 999px;
  font-weight: 600;
  color: #1a2d44;
  transition: color 0.2s ease, background 0.2s ease;
}

.nav-links a:hover {
  color: var(--accent-strong);
  background: rgba(17, 42, 67, 0.06);
}

.nav-links .login {
  background: linear-gradient(120deg, var(--accent), var(--accent-strong));
  color: #0a1928;
  border: none;
  box-shadow: 0 10px 25px rgba(0,0,0,0.16);
}

.nav-links .login:hover {
  transform: translateY(-1px);
  box-shadow: 0 16px 36px rgba(0,0,0,0.22);
}

.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.25rem;
}

.hamburger span {
  width: 24px;
  height: 2px;
  background: #1a2d44;
  transition: transform 0.3s ease, opacity 0.3s ease;
}

.hamburger.active span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.hamburger.active span:nth-child(2) {
  opacity: 0;
}

.hamburger.active span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* Hero */
.hero {
  position: relative;
  min-height: 100vh;
  display: grid;
  align-items: center;
  padding: 0 6vw;
  overflow: hidden;
  background: radial-gradient(circle at 30% 20%, rgba(32, 72, 112, 0.35), transparent 45%), #102a45;
}

.hero-video {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, rgba(10, 22, 40, 0.7), rgba(12, 32, 58, 0.55));
  z-index: 1;
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 820px;
  padding: 5rem 0;
  animation: fadeUp 0.9s ease both;
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 1.1px;
  font-size: 0.9rem;
  color: var(--accent);
  margin-bottom: 1rem;
}

.hero h1 {
  font-size: clamp(2.2rem, 4vw, 3.8rem);
  line-height: 1.1;
  margin-bottom: 1rem;
}

.hero-rotating {
  font-size: 1.2rem;
  font-weight: 600;
  color: #b7c7dc;
  min-height: 1.6em;
  opacity: 1;
  transition: opacity 0.5s ease;
}

.hero-rotating.fade-out {
  opacity: 0;
}

.hero-subtitle {
  max-width: 680px;
  color: var(--muted);
  margin: 1rem 0 2rem 0;
}

.hero-actions {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

/* About */
.about {
  background: #f6f8fc;
  color: #0c1f33;
}

.about p {
  color: #26354b;
}

.link-button {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 700;
  color: #0c1f33;
  border-bottom: 2px solid #0c1f33;
  transition: transform 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.link-button:hover {
  transform: translateY(-1px);
  color: var(--accent-strong);
  border-color: var(--accent-strong);
}

.about-actions {
  text-align: center;
}

/* Módulos */
.modules {
  background: var(--bg-alt);
}

.modules-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.5rem;
}

.module-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 16px;
  overflow: hidden;
  transition: transform 0.25s ease, box-shadow 0.3s ease, border-color 0.3s ease;
  display: grid;
  grid-template-rows: 180px 1fr;
  animation: fadeUp 0.7s ease both;
}

.module-card:nth-child(2) { animation-delay: 0.05s; }
.module-card:nth-child(3) { animation-delay: 0.1s; }
.module-card:nth-child(4) { animation-delay: 0.15s; }

.module-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow);
  border-color: rgba(255, 255, 255, 0.15);
}

.module-img {
  background-size: cover;
  background-position: center;
}

.module-body {
  padding: 1.4rem;
}

.module-body h3 {
  margin-bottom: 0.5rem;
}

.module-body p {
  color: var(--muted);
}

/* Cómo funciona */
.how-it-works {
  background: var(--bg);
}

.timeline {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.5rem;
  position: relative;
}

.step {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 1.5rem;
  position: relative;
  overflow: hidden;
  transition: transform 0.2s ease, border-color 0.2s ease;
  animation: fadeUp 0.7s ease both;
}

.step:nth-child(2) { animation-delay: 0.05s; }
.step:nth-child(3) { animation-delay: 0.1s; }
.step:nth-child(4) { animation-delay: 0.15s; }

.step:hover {
  transform: translateY(-4px);
  border-color: rgba(255, 255, 255, 0.15);
}

.step::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(20, 184, 102, 0.08), transparent 60%);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.step:hover::after {
  opacity: 1;
}

.icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: rgba(20, 184, 102, 0.16);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  margin-bottom: 1rem;
}

.step p {
  color: var(--muted);
}

/* Beneficios */
.benefits {
  background: var(--bg-alt);
}

.benefits-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1rem;
}

.benefit-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 1.2rem 1.3rem;
  display: flex;
  gap: 0.9rem;
  align-items: center;
  transition: transform 0.2s ease, border-color 0.2s ease;
  animation: fadeUp 0.7s ease both;
}

.benefit-card:nth-child(2) { animation-delay: 0.05s; }
.benefit-card:nth-child(3) { animation-delay: 0.1s; }
.benefit-card:nth-child(4) { animation-delay: 0.15s; }
.benefit-card:nth-child(5) { animation-delay: 0.2s; }
.benefit-card:nth-child(6) { animation-delay: 0.25s; }

.benefit-card:hover {
  transform: translateY(-3px);
  border-color: rgba(255, 255, 255, 0.12);
}

.benefit-icon {
  font-size: 1.5rem;
}

.benefit-card p {
  color: var(--muted);
  margin: 0;
}

/* Casos / Destacados con imagen */
.cases {
  background: #f4f7fb;
  color: #0f1f33;
}

.cases .section-header p {
  color: #42526b;
}

.cases-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.2rem;
}

.case-card {
  background: #ffffff;
  border: 1px solid rgba(15, 31, 51, 0.08);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 18px 48px rgba(15, 31, 51, 0.08);
  display: grid;
  grid-template-rows: 190px 1fr;
  animation: fadeUp 0.7s ease both;
}

.case-card:nth-child(2) { animation-delay: 0.05s; }
.case-card:nth-child(3) { animation-delay: 0.1s; }
.case-card:nth-child(4) { animation-delay: 0.15s; }

.case-card .case-img {
  background-size: cover;
  background-position: center;
}

.case-card .case-body {
  padding: 1.3rem;
}

.case-card h3 {
  margin-bottom: 0.4rem;
  color: #0f1f33;
}

.case-card p {
  color: #42526b;
  margin: 0;
}

/* Clientes */
.clients {
  background: var(--bg);
}

.clients-logos {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1rem;
}

.logo-placeholder {
  border: 1px dashed rgba(255, 255, 255, 0.3);
  border-radius: 12px;
  padding: 1.5rem;
  text-align: center;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.02);
}

/* Testimonios */
.testimonials {
  background: var(--bg-alt);
}

.testimonials-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1rem;
}

.testimonial-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 1.4rem;
  color: var(--muted);
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.testimonial-card:hover {
  transform: translateY(-4px);
  border-color: rgba(255, 255, 255, 0.12);
}

.author {
  display: block;
  margin-top: 1rem;
  color: var(--text);
  font-weight: 600;
}

/* Contacto */
.contact {
  background: linear-gradient(135deg, rgba(12, 31, 51, 0.95), rgba(10, 24, 40, 0.95));
  border-top: 1px solid var(--border);
}

.contact-content {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
  align-items: start;
}

.contact h2 {
  margin-bottom: 0.5rem;
}

.contact p {
  color: var(--muted);
}

.contact-form {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 1.5rem;
  box-shadow: var(--shadow);
  animation: fadeUp 0.8s ease both;
}

.form-row {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  margin-bottom: 1rem;
}

.form-row label {
  font-weight: 600;
}

.form-row input,
.form-row textarea {
  background: #18324c;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 10px;
  padding: 0.8rem 0.9rem;
  color: var(--text);
  font-family: var(--font);
}

.form-row input:focus,
.form-row textarea:focus {
  outline: 1px solid var(--accent);
  border-color: var(--accent);
}

.form-feedback {
  min-height: 1.2rem;
  margin-top: 0.5rem;
  color: var(--accent);
  font-weight: 600;
}

/* Footer */
.footer {
  text-align: center;
  padding: 1.5rem 6vw;
  color: var(--muted);
  border-top: 1px solid var(--border);
  background: #081320;
}

/* Responsive */
@media (max-width: 900px) {
  .nav-links {
    position: absolute;
    top: 100%;
    right: 6vw;
    background: #f6f8fc;
    border: 1px solid rgba(17, 42, 67, 0.12);
    border-radius: 12px;
    padding: 0.6rem;
    flex-direction: column;
    gap: 0.4rem;
    width: 220px;
    display: none;
  }

  .nav-links.open {
    display: flex;
  }

  .hamburger {
    display: flex;
  }

  .hero {
    padding: 0 6vw 4rem 6vw;
  }
}

@media (max-width: 640px) {
  .section {
    padding: 4rem 6vw;
  }

  .hero-actions {
    flex-direction: column;
    align-items: flex-start;
  }

  .module-card {
    grid-template-rows: 140px 1fr;
  }
}
