:root {
  --blue-950: #051a33;
  --blue-900: #062246;
  --blue-800: #0a315f;
  --blue-100: #e8f0f8;
  --red-600: #d7101f;
  --red-700: #b90d19;
  --white: #ffffff;
  --gray-50: #f7f9fc;
  --gray-100: #edf1f6;
  --gray-300: #cfd8e3;
  --gray-600: #5f6f83;
  --gray-900: #142033;
  --shadow: 0 24px 70px rgba(5, 26, 51, 0.14);
  --radius: 8px;
  --transition: 220ms ease;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--gray-900);
  background: var(--white);
  overflow-x: hidden;
  font-family: Inter, "Segoe UI", Roboto, Arial, Helvetica, sans-serif;
  line-height: 1.6;
}

body.menu-open {
  overflow: hidden;
}

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

img,
svg {
  display: block;
  max-width: 100%;
}

.container {
  width: min(1120px, calc(100% - 40px));
  margin: 0 auto;
}

.hero-content,
.section-copy,
.section-heading,
.contact-info {
  min-width: 0;
}

.section {
  padding: 92px 0;
}

.section-dark {
  color: var(--white);
  background:
    radial-gradient(circle at 75% 35%, rgba(41, 112, 191, 0.34), transparent 34%),
    linear-gradient(135deg, var(--blue-950), var(--blue-900));
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.96);
  border-bottom: 1px solid rgba(207, 216, 227, 0.8);
  backdrop-filter: blur(12px);
}

/* Navegación superior */
.navbar {
  min-height: 78px;
  display: flex;
  align-items: center;
  gap: 28px;
}

.brand {
  display: inline-flex;
  align-items: center;
  flex: 0 0 auto;
}

.brand-logo {
  width: clamp(164px, 17vw, 230px);
  height: auto;
  object-fit: contain;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 26px;
  margin: 0 0 0 auto;
  padding: 0;
  list-style: none;
}

.nav-links a {
  color: var(--blue-900);
  font-size: 14px;
  font-weight: 700;
  transition: color var(--transition);
}

.nav-links a:hover,
.nav-links a:focus-visible {
  color: var(--red-600);
}

/* Botones reutilizables */
.nav-cta,
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 22px;
  border: 1px solid transparent;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 800;
  text-align: center;
  cursor: pointer;
  transition: transform var(--transition), box-shadow var(--transition), background var(--transition), color var(--transition);
}

.nav-cta,
.btn-primary {
  color: var(--white);
  background: var(--red-600);
  box-shadow: 0 12px 26px rgba(215, 16, 31, 0.24);
}

.nav-cta:hover,
.btn-primary:hover {
  background: var(--red-700);
  transform: translateY(-2px);
}

.btn-outline {
  color: var(--white);
  border-color: rgba(255, 255, 255, 0.42);
  background: rgba(255, 255, 255, 0.05);
}

.btn-outline:hover {
  border-color: var(--white);
  background: rgba(255, 255, 255, 0.12);
  transform: translateY(-2px);
}

.btn-light {
  color: var(--red-600);
  background: var(--white);
}

.btn-light:hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 30px rgba(5, 26, 51, 0.18);
}

.menu-toggle {
  display: none;
  width: 44px;
  height: 44px;
  margin-left: auto;
  padding: 0;
  border: 0;
  border-radius: 6px;
  background: var(--gray-100);
}

.menu-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  margin: 5px auto;
  background: var(--blue-900);
  transition: transform var(--transition), opacity var(--transition);
}

/* Hero */
.hero {
  position: relative;
  overflow: hidden;
  padding: 112px 0 104px;
}

.hero::before {
  position: absolute;
  inset: 0;
  content: "";
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.05) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: linear-gradient(90deg, black, transparent 86%);
}

.hero-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(360px, 0.95fr);
  align-items: center;
  gap: 64px;
}

.hero h1 {
  max-width: 720px;
  margin: 0;
  font-size: clamp(42px, 6vw, 68px);
  line-height: 1.02;
  letter-spacing: 0;
  overflow-wrap: break-word;
}

.hero h1::after {
  display: block;
  width: 92px;
  height: 5px;
  margin-top: 28px;
  content: "";
  background: var(--red-600);
  border-radius: 999px;
}

.hero p {
  max-width: 610px;
  margin: 28px 0 0;
  color: rgba(255, 255, 255, 0.82);
  font-size: 18px;
  overflow-wrap: break-word;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 36px;
}

.hero-visual {
  min-height: 410px;
  display: grid;
  place-items: center;
}

.server-frame {
  position: relative;
  width: min(100%, 460px);
  aspect-ratio: 1 / 0.82;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: var(--radius);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.14), rgba(255, 255, 255, 0.04)),
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.09) 0 1px, transparent 1px 42px);
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.28);
  overflow: hidden;
}

.server-frame::before,
.server-frame::after {
  position: absolute;
  inset: 12%;
  content: "";
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 50%;
  animation: pulseRing 4s ease-in-out infinite;
}

.server-frame::after {
  inset: 25%;
  animation-delay: 1.2s;
}

.shield-icon {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: var(--white);
}

.shield-icon svg {
  width: 128px;
  fill: none;
  stroke: currentColor;
  stroke-width: 3;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.node {
  position: absolute;
  width: 14px;
  height: 14px;
  border: 3px solid var(--white);
  border-radius: 50%;
  background: var(--red-600);
  box-shadow: 0 0 0 12px rgba(215, 16, 31, 0.14);
}

.node-a { top: 18%; left: 24%; }
.node-b { right: 20%; top: 30%; }
.node-c { right: 34%; bottom: 18%; }

.server-stack {
  position: absolute;
  right: 22px;
  bottom: 22px;
  display: grid;
  gap: 8px;
  width: 118px;
}

.server-stack span {
  height: 18px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.18);
}

/* Bloques de contenido corporativo */
.split,
.benefits-grid,
.contact-grid,
.cyber-grid,
.cta-grid {
  display: grid;
  align-items: center;
  gap: 56px;
}

.split {
  grid-template-columns: 0.95fr 1.05fr;
}

.section-label {
  display: block;
  margin-bottom: 12px;
  color: var(--red-600);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.section-copy h2,
.section-heading h2,
.cyber-band h2,
.cta h2,
.contact h2 {
  margin: 0;
  color: var(--blue-950);
  font-size: clamp(30px, 4vw, 44px);
  line-height: 1.14;
}

.section-copy p,
.section-heading p,
.contact-info p {
  color: var(--gray-600);
  font-size: 16px;
}

.section-heading {
  max-width: 760px;
  margin: 0 auto 42px;
  text-align: center;
}

.about-panel {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 18px;
  padding: 28px;
  border: 1px solid var(--gray-100);
  border-radius: var(--radius);
  background:
    linear-gradient(135deg, rgba(10, 49, 95, 0.08), rgba(215, 16, 31, 0.04)),
    var(--white);
  box-shadow: var(--shadow);
}

.metric {
  padding: 24px;
  border-radius: var(--radius);
  background: var(--white);
}

.metric strong {
  display: block;
  color: var(--red-600);
  font-size: 34px;
  line-height: 1;
}

.metric span {
  display: block;
  margin-top: 8px;
  color: var(--blue-900);
  font-size: 14px;
  font-weight: 700;
}

.services,
.benefits {
  background: var(--gray-50);
}

.cards-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
}

/* Tarjetas de servicios y beneficios */
.service-card,
.mini-card,
.license-card {
  border: 1px solid var(--gray-100);
  border-radius: var(--radius);
  background: var(--white);
  transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
}

.service-card {
  min-height: 300px;
  padding: 30px 24px;
}

.service-card:hover,
.mini-card:hover,
.license-card:hover {
  border-color: rgba(215, 16, 31, 0.25);
  box-shadow: var(--shadow);
  transform: translateY(-6px);
}

.card-icon {
  width: 58px;
  height: 58px;
  display: grid;
  place-items: center;
  margin-bottom: 24px;
  color: var(--blue-900);
  border-radius: 8px;
  background: var(--blue-100);
}

.card-icon svg {
  width: 34px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.service-card h3,
.mini-card h3 {
  margin: 0 0 12px;
  color: var(--blue-950);
  font-size: 18px;
  line-height: 1.25;
}

.service-card p,
.mini-card p,
.license-card p {
  margin: 0;
  color: var(--gray-600);
  font-size: 14px;
}

.benefits-grid {
  grid-template-columns: 0.9fr 1.1fr;
}

.check-list {
  display: grid;
  gap: 12px;
  margin: 28px 0 0;
  padding: 0;
  list-style: none;
}

.check-list li {
  position: relative;
  padding-left: 30px;
  color: var(--gray-900);
  font-weight: 600;
}

.check-list li::before {
  position: absolute;
  left: 0;
  top: 1px;
  content: "✓";
  color: var(--red-600);
  font-weight: 800;
}

.benefit-cards {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 18px;
}

.mini-card {
  padding: 26px;
}

/* Licenciamiento */
.license-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.license-card {
  padding: 34px 30px;
  text-align: center;
}

.vendor-logo {
  height: 72px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 18px;
}

.vendor-logo img {
  max-width: min(100%, 210px);
  max-height: 54px;
  object-fit: contain;
}

/* Seguridad */
.cyber-band {
  padding: 76px 0;
}

.cyber-grid {
  grid-template-columns: 0.95fr 1.05fr;
}

.cyber-band h2 {
  color: var(--white);
}

.cyber-list {
  display: grid;
  gap: 15px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.cyber-list li {
  position: relative;
  padding: 16px 16px 16px 46px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.06);
}

.cyber-list li::before {
  position: absolute;
  left: 18px;
  color: var(--red-600);
  content: "●";
}

.cta {
  padding: 38px 0;
  color: var(--white);
  background: linear-gradient(135deg, var(--red-700), var(--red-600));
}

.cta-grid {
  grid-template-columns: 1fr auto;
}

.cta h2,
.cta p {
  color: var(--white);
}

.cta h2 {
  font-size: clamp(26px, 3vw, 36px);
}

.cta p {
  margin: 8px 0 0;
}

/* Contacto */
.contact-grid {
  grid-template-columns: 0.82fr 1.18fr;
  align-items: start;
}

.contact-info ul {
  display: grid;
  gap: 12px;
  margin: 28px 0 0;
  padding: 0;
  list-style: none;
}

.text-link {
  color: var(--red-600);
  font-weight: 800;
}

.text-link:hover,
.text-link:focus-visible {
  color: var(--red-700);
  text-decoration: underline;
}

.contact-form {
  padding: 30px;
  border: 1px solid var(--gray-100);
  border-radius: var(--radius);
  background: var(--white);
  box-shadow: var(--shadow);
}

.form-row {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

label {
  display: grid;
  gap: 8px;
  margin-bottom: 16px;
}

label span {
  color: var(--blue-900);
  font-size: 13px;
  font-weight: 800;
}

input,
select,
textarea {
  width: 100%;
  min-height: 46px;
  padding: 12px 14px;
  color: var(--gray-900);
  border: 1px solid var(--gray-300);
  border-radius: 6px;
  background: var(--white);
  font: inherit;
  transition: border-color var(--transition), box-shadow var(--transition);
}

textarea {
  resize: vertical;
}

.spam-check {
  padding: 14px;
  border: 1px solid var(--blue-100);
  border-radius: 6px;
  background: var(--gray-50);
}

.spam-check strong {
  color: var(--red-600);
}

.form-honeypot {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
}

input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: var(--blue-800);
  box-shadow: 0 0 0 4px rgba(10, 49, 95, 0.12);
}

.form-status {
  min-height: 24px;
  margin: 14px 0 0;
  color: var(--blue-900);
  font-weight: 700;
}

/* Botón flotante de WhatsApp */
.whatsapp-float {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 45;
  width: 60px;
  height: 60px;
  display: grid;
  place-items: center;
  color: var(--white);
  border-radius: 50%;
  background: #25d366;
  box-shadow: 0 18px 34px rgba(37, 211, 102, 0.34);
  transition: transform var(--transition);
}

.whatsapp-float:hover {
  transform: translateY(-4px) scale(1.03);
}

.whatsapp-float svg {
  width: 34px;
  fill: currentColor;
}

/* Footer */
.footer {
  padding: 58px 0 24px;
  color: rgba(255, 255, 255, 0.78);
  background: var(--blue-950);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.2fr repeat(3, 1fr);
  gap: 42px;
}

.footer h3 {
  color: var(--white);
}

.footer-brand {
  display: inline-flex;
  padding: 8px 10px;
  border-radius: 6px;
  background: var(--white);
}

.footer-brand .brand-logo {
  width: 188px;
}

.footer p,
.footer a {
  display: block;
  margin: 8px 0;
  color: rgba(255, 255, 255, 0.72);
  font-size: 14px;
}

.footer h3 {
  margin: 0 0 14px;
  font-size: 14px;
  text-transform: uppercase;
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  margin-top: 42px;
  padding-top: 22px;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  font-size: 13px;
}

/* Animaciones suaves al hacer scroll */
.reveal {
  opacity: 1;
  transform: none;
}

.reveal.is-visible {
  animation: revealUp 700ms ease both;
}

@keyframes pulseRing {
  0%, 100% {
    opacity: 0.25;
    transform: scale(0.96);
  }
  50% {
    opacity: 0.7;
    transform: scale(1.04);
  }
}

@keyframes revealUp {
  from {
    opacity: 0;
    transform: translateY(24px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  .reveal {
    opacity: 1;
    transform: none;
  }
}

@media (max-width: 980px) {
  .nav-cta {
    display: none;
  }

  .cards-grid,
  .license-grid,
  .footer-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .hero-grid,
  .split,
  .benefits-grid,
  .contact-grid,
  .cyber-grid {
    grid-template-columns: 1fr;
  }

  .hero {
    padding: 86px 0 72px;
  }

  .hero-visual {
    min-height: 330px;
  }
}

@media (max-width: 760px) {
  .container {
    width: calc(100% - 28px);
  }

  .navbar {
    min-height: 70px;
  }

  .menu-toggle {
    display: block;
  }

  .menu-open .menu-toggle span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
  }

  .menu-open .menu-toggle span:nth-child(2) {
    opacity: 0;
  }

  .menu-open .menu-toggle span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
  }

  .nav-links {
    position: fixed;
    inset: 70px 0 auto 0;
    display: grid;
    gap: 0;
    padding: 18px 20px 26px;
    background: var(--white);
    border-bottom: 1px solid var(--gray-100);
    box-shadow: var(--shadow);
    transform: translateY(-120%);
    transition: transform var(--transition);
  }

  .menu-open .nav-links {
    transform: translateY(0);
  }

  .nav-links a {
    display: block;
    padding: 14px 0;
    font-size: 16px;
  }

  .brand-logo {
    width: 146px;
  }

  .section {
    padding: 68px 0;
  }

  .hero h1 {
    font-size: clamp(36px, 11.2vw, 48px);
  }

  .hero p {
    font-size: 16px;
  }

  .cards-grid,
  .benefit-cards,
  .license-grid,
  .footer-grid,
  .form-row,
  .about-panel,
  .cta-grid {
    grid-template-columns: 1fr;
  }

  .cta-grid {
    gap: 24px;
  }

  .service-card {
    min-height: auto;
  }

  .footer-bottom {
    flex-direction: column;
  }

  .whatsapp-float {
    right: 16px;
    bottom: 16px;
  }

  .hero-actions {
    display: grid;
    width: 100%;
    max-width: 100%;
  }

  .hero-actions .btn {
    width: 100%;
    min-height: 48px;
    white-space: normal;
  }
}
