/* ===== Variables ===== */
:root {
  --navy: #0d0d12;
  --navy-soft: #1a1a21;
  --violet: #6878D6;
  --violet-dark: #5566c4;
  --bg-light: #f4f4f7;
  --white: #ffffff;
  --text-dark: #111114;
  --text-muted: #5c5c66;
  --radius: 14px;
  --shadow: 0 10px 30px rgba(13, 13, 18, 0.12);
  --font-heading: 'Poppins', sans-serif;
  --font-body: 'Inter', sans-serif;
}

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

html { scroll-behavior: smooth; max-width: 100%; overflow-x: hidden; }

body {
  font-family: var(--font-body);
  color: var(--text-dark);
  background: var(--white);
  line-height: 1.6;
  max-width: 100%;
  overflow-x: hidden;
}

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

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

h1, h2, h3, h4 { font-family: var(--font-heading); color: var(--navy); font-weight: 700; }

.container {
  width: 100%;
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ===== Buttons ===== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 13px 26px;
  border-radius: 100px;
  font-weight: 600;
  font-size: 0.95rem;
  border: 2px solid transparent;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}
.btn-primary {
  background: var(--violet);
  color: var(--white);
  box-shadow: 0 8px 20px rgba(104, 120, 214, 0.35);
}
.btn-primary:hover { background: var(--violet-dark); transform: translateY(-2px); }

.btn-outline {
  border-color: var(--violet);
  color: var(--violet);
  background: transparent;
}
.btn-outline:hover { background: var(--violet); color: var(--white); }

.btn-whatsapp {
  background: #25D366;
  color: var(--white);
}
.btn-whatsapp:hover { background: #1fb958; transform: translateY(-2px); }

/* ===== Header ===== */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: rgba(244, 244, 247, 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid rgba(13, 13, 18, 0.08);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  height: 76px;
}
.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-heading);
  font-weight: 800;
  letter-spacing: 0.5px;
  color: var(--navy);
  font-size: 1.15rem;
  white-space: nowrap;
}
.logo-img { height: 46px; width: auto; }

.main-nav {
  display: flex;
  gap: 32px;
  flex: 1;
  justify-content: center;
}
.main-nav a {
  font-weight: 600;
  color: var(--navy);
  font-size: 0.95rem;
  position: relative;
  padding: 6px 0;
}
.main-nav a::after {
  content: '';
  position: absolute;
  left: 0; bottom: 0;
  height: 2px;
  width: 0;
  background: var(--violet);
  transition: width 0.2s ease;
}
.main-nav a:hover::after { width: 100%; }
.main-nav a.active { color: var(--violet); }
.main-nav a.active::after { width: 100%; }

.header-btn { white-space: nowrap; }

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 40px;
  height: 40px;
  background: none;
  border: none;
  cursor: pointer;
}
.nav-toggle span {
  width: 24px;
  height: 2px;
  background: var(--navy);
  transition: transform 0.2s ease, opacity 0.2s ease;
}

/* ===== Hero ===== */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  overflow: hidden;
  color: var(--white);
}
.hero-bg {
  position: absolute;
  inset: 0;
  background-image: url('../assets/img/hero.jpg');
  background-size: cover;
  background-position: center;
  background-color: var(--navy);
}
.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(13,13,18,0.6) 0%, rgba(13,13,18,0.8) 55%, var(--navy) 100%);
}
.hero-content {
  position: relative;
  z-index: 2;
  padding-top: 76px;
  max-width: 680px;
}
.hero h1 {
  color: var(--white);
  font-size: clamp(2.2rem, 5vw, 3.4rem);
  line-height: 1.1;
  margin-bottom: 20px;
}
.hero p {
  font-size: 1.05rem;
  color: rgba(255,255,255,0.85);
  margin-bottom: 32px;
  max-width: 540px;
}
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
}

/* ===== Section heading ===== */
.section-heading {
  text-align: center;
  max-width: 560px;
  margin: 0 auto 56px;
}
.section-heading h2 { font-size: clamp(1.8rem, 3vw, 2.4rem); margin-bottom: 12px; }
.section-heading p { color: var(--text-muted); font-size: 1.05rem; }
.section-heading.light h2 { color: var(--white); }
.section-heading.light p { color: rgba(255,255,255,0.75); }

/* ===== Nuestros Sistemas ===== */
.systems {
  background: var(--bg-light);
  padding: 100px 0;
}
.systems-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 32px;
}
.system-card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 40px;
  box-shadow: var(--shadow);
  transition: transform 0.2s ease;
}
.system-card:hover { transform: translateY(-6px); }
.system-icon {
  width: 64px;
  height: 64px;
  border-radius: 16px;
  background: rgba(104, 120, 214, 0.12);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
}
.system-icon img { width: 32px; height: 32px; }
.system-card h3 { font-size: 1.4rem; margin-bottom: 4px; }
.system-tag {
  color: var(--violet);
  font-weight: 600;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 16px;
}
.system-card > p:not(.system-tag) { color: var(--text-muted); margin-bottom: 24px; }

/* ===== Por qué elegirnos ===== */
.why-us {
  background: var(--navy);
  padding: 100px 0;
}
.why-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 32px;
}
.why-item { text-align: center; color: rgba(255,255,255,0.85); }
.why-icon {
  font-size: 2rem;
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: rgba(104, 120, 214, 0.18);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 18px;
}
.why-item h3 { color: var(--white); font-size: 1.1rem; margin-bottom: 8px; }
.why-item p { font-size: 0.92rem; color: rgba(255,255,255,0.65); }

/* ===== Contacto ===== */
.contact { padding: 100px 0; }
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  gap: 64px;
  align-items: start;
}
.contact-info h2 { font-size: clamp(1.8rem, 3vw, 2.2rem); margin-bottom: 12px; }
.contact-info > p { color: var(--text-muted); margin-bottom: 32px; }

.contact-list { list-style: none; display: flex; flex-direction: column; gap: 20px; }
.contact-list li { display: flex; flex-direction: column; gap: 2px; }
.contact-label { font-size: 0.8rem; font-weight: 700; color: var(--violet); text-transform: uppercase; letter-spacing: 0.5px; }
.contact-list a, .contact-list span { color: var(--text-dark); font-weight: 500; }
.contact-list a:hover { color: var(--violet); }

.contact-form {
  background: var(--bg-light);
  padding: 40px;
  border-radius: var(--radius);
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.form-row { display: flex; flex-direction: column; gap: 6px; }
.form-row label { font-size: 0.88rem; font-weight: 600; color: var(--navy); }
.form-row input, .form-row textarea {
  border: 1px solid rgba(13,13,18,0.18);
  border-radius: 10px;
  padding: 12px 14px;
  font-family: var(--font-body);
  font-size: 0.95rem;
  background: var(--white);
  resize: vertical;
}
.form-row input:focus, .form-row textarea:focus {
  outline: none;
  border-color: var(--violet);
  box-shadow: 0 0 0 3px rgba(104,120,214,0.15);
}
.form-submit { align-self: flex-start; margin-top: 4px; border: none; }

/* ===== Footer ===== */
.site-footer { background: var(--navy); color: rgba(255,255,255,0.85); padding-top: 64px; }
.footer-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 40px;
  padding-bottom: 48px;
}
.footer-col h4 {
  color: var(--white);
  font-size: 0.95rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 18px;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--violet);
  display: inline-block;
}
.footer-col { display: flex; flex-direction: column; gap: 10px; }
.footer-col a, .footer-col p { color: rgba(255,255,255,0.75); font-size: 0.95rem; }
.footer-col a:hover { color: var(--white); }

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.12);
  padding: 22px 24px;
  text-align: center;
  font-size: 0.85rem;
  color: rgba(255,255,255,0.6);
}

/* ===== WhatsApp float button ===== */
.whatsapp-float {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 58px;
  height: 58px;
  border-radius: 50%;
  background: #25D366;
  color: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 20px rgba(37, 211, 102, 0.45);
  z-index: 90;
  transition: transform 0.2s ease;
}
.whatsapp-float:hover { transform: scale(1.08); }

/* ===== Scroll state ===== */
.site-header.scrolled {
  background: rgba(244, 244, 247, 0.98);
  box-shadow: 0 4px 20px rgba(13,13,18,0.1);
}

/* ===== Hero dividido (Inicio) ===== */
.hero-split {
  position: relative;
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1fr 1fr;
  color: var(--white);
}
.hero-split-text {
  background: var(--navy);
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 76px 64px 64px;
  position: relative;
  z-index: 2;
}
.hero-split-text h1 {
  color: var(--white);
  font-size: clamp(2rem, 4vw, 3rem);
  line-height: 1.12;
  margin-bottom: 20px;
}
.hero-split-text p {
  color: rgba(255,255,255,0.85);
  font-size: 1.03rem;
  max-width: 460px;
  margin-bottom: 32px;
}
.hero-split-img {
  position: relative;
  background-size: cover;
  background-position: center;
  background-color: var(--navy-soft);
  background-image: url('../assets/img/hero-team.jpg');
}
.hero-split-img::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(13,13,18,0.6) 0%, rgba(13,13,18,0) 30%);
}

/* Bienvenida corta en Inicio, con links a las otras páginas */
.teasers { padding: 100px 0; background: var(--bg-light); }
.teaser-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}
.teaser-card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 36px 32px;
  box-shadow: var(--shadow);
  transition: transform 0.2s ease;
}
.teaser-card:hover { transform: translateY(-6px); }
.teaser-card .teaser-icon {
  width: 56px; height: 56px;
  border-radius: 14px;
  background: rgba(104,120,214,0.12);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.5rem;
  margin-bottom: 18px;
}
.teaser-card h3 { font-size: 1.2rem; margin-bottom: 8px; }
.teaser-card p { color: var(--text-muted); margin-bottom: 18px; font-size: 0.95rem; }
.teaser-card .link-arrow { color: var(--violet); font-weight: 600; font-size: 0.92rem; }

/* ===== Page header simple (Servicios, Sistemas, Nosotros, Contacto) ===== */
.page-hero {
  position: relative;
  padding: 180px 0 100px;
  overflow: hidden;
  color: var(--white);
  text-align: center;
}
.page-hero .hero-bg { background-image: url('../assets/img/hero.jpg'); }
.page-hero .hero-content { position: relative; z-index: 2; max-width: 640px; margin: 0 auto; }
.page-hero h1 { color: var(--white); font-size: clamp(2rem, 4vw, 2.8rem); margin-bottom: 16px; }
.page-hero p { color: rgba(255,255,255,0.85); font-size: 1.05rem; margin-bottom: 28px; }

/* ===== Nosotros: estadísticas ===== */
.about-stats { padding: 100px 0; }
.about-stats-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 56px;
  align-items: center;
}
.about-stats h2 { font-size: clamp(1.8rem, 3vw, 2.4rem); margin-bottom: 18px; }
.about-stats p { color: var(--text-muted); margin-bottom: 16px; }
.about-numbers {
  display: flex;
  gap: 32px;
  margin-top: 28px;
  flex-wrap: wrap;
}
.about-numbers .num { font-family: var(--font-heading); font-size: 2.2rem; font-weight: 800; color: var(--violet); }
.about-numbers .num-label { font-size: 0.88rem; color: var(--text-muted); font-weight: 600; }
.about-stats-img img { border-radius: var(--radius); box-shadow: var(--shadow); }

/* ===== Nuestro propósito ===== */
.purpose { padding: 100px 0; background: var(--bg-light); }
.purpose-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}
.purpose-card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 36px 30px;
  text-align: center;
  box-shadow: var(--shadow);
}
.purpose-icon {
  width: 64px; height: 64px;
  border-radius: 50%;
  border: 2px solid var(--violet);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.6rem;
  margin: 0 auto 18px;
}
.purpose-card h3 { font-size: 1.15rem; margin-bottom: 10px; }
.purpose-card p { color: var(--text-muted); font-size: 0.95rem; }

/* ===== Servicios: tarjetas con checklist ===== */
.services-list { padding: 100px 0; background: var(--bg-light); }
.services-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}
.service-card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 36px 32px;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
}
.service-card .service-icon {
  width: 60px; height: 60px;
  border-radius: 50%;
  border: 2px solid var(--violet);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.5rem;
  margin-bottom: 20px;
}
.service-card h3 { font-size: 1.25rem; margin-bottom: 12px; }
.service-card > p { color: var(--text-muted); font-size: 0.93rem; margin-bottom: 18px; }
.service-checklist { list-style: none; display: flex; flex-direction: column; gap: 10px; margin-bottom: 24px; flex: 1; }
.service-checklist li { font-size: 0.9rem; color: var(--text-dark); padding-left: 24px; position: relative; }
.service-checklist li::before {
  content: '✓';
  position: absolute; left: 0; top: 0;
  color: var(--violet);
  font-weight: 700;
}
.service-card .link-arrow { color: var(--violet); font-weight: 600; font-size: 0.95rem; }

/* ===== Cómo trabajamos (timeline) ===== */
.process { padding: 100px 0; }
.process-steps {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  position: relative;
  margin-top: 20px;
}
.process-step { text-align: center; position: relative; }
.process-num {
  width: 52px; height: 52px;
  border-radius: 50%;
  background: var(--violet);
  color: var(--white);
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1.15rem;
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 18px;
  position: relative;
  z-index: 2;
}
.process-step:not(:last-child)::after {
  content: '';
  position: absolute;
  top: 26px;
  left: calc(50% + 26px);
  width: calc(100% - 52px);
  border-top: 2px dashed rgba(104,120,214,0.4);
  z-index: 1;
}
.process-step h3 { font-size: 1.05rem; margin-bottom: 8px; }
.process-step p { color: var(--text-muted); font-size: 0.88rem; }

/* ===== CTA final ===== */
.cta {
  background: var(--navy);
  padding: 90px 0;
  text-align: center;
  color: var(--white);
}
.cta h2 { color: var(--white); font-size: clamp(1.6rem, 3vw, 2.2rem); margin-bottom: 14px; }
.cta p { color: rgba(255,255,255,0.75); margin-bottom: 30px; max-width: 480px; margin-left: auto; margin-right: auto; }
.cta-actions { display: flex; justify-content: center; gap: 16px; flex-wrap: wrap; }

/* ===== Link con flecha ===== */
.link-arrow { display: inline-flex; align-items: center; gap: 4px; }

/* ===== Responsive ===== */
@media (max-width: 960px) {
  .systems-grid { grid-template-columns: 1fr; }
  .why-grid { grid-template-columns: repeat(2, 1fr); }
  .contact-grid { grid-template-columns: 1fr; gap: 40px; }
  .hero-split { grid-template-columns: 1fr; min-height: auto; }
  .hero-split-img { min-height: 320px; order: -1; }
  .hero-split-text { padding: 48px 32px; }
  .teaser-grid { grid-template-columns: 1fr; }
  .about-stats-grid { grid-template-columns: 1fr; gap: 32px; }
  .about-stats-img { order: -1; }
  .purpose-grid { grid-template-columns: 1fr; }
  .services-grid { grid-template-columns: 1fr; }
  .process-steps { grid-template-columns: repeat(2, 1fr); row-gap: 40px; }
  .process-step:nth-child(2)::after { display: none; }
}

@media (max-width: 780px) {
  .main-nav {
    position: fixed;
    top: 76px;
    left: 0;
    right: 0;
    background: var(--bg-light);
    flex-direction: column;
    align-items: center;
    gap: 0;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.25s ease;
    box-shadow: 0 10px 20px rgba(13,13,18,0.1);
  }
  .main-nav.open { max-height: 320px; }
  .main-nav a { padding: 16px 0; width: 100%; text-align: center; }
  .header-btn { display: none; }
  .nav-toggle { display: flex; }
  .why-grid { grid-template-columns: 1fr; }
  .whatsapp-float { bottom: 16px; right: 16px; }
  .footer-grid { grid-template-columns: 1fr; gap: 28px; text-align: center; }
  .footer-col h4 { align-self: center; }
  .header-inner { gap: 12px; }
}

/* Teléfonos chicos */
@media (max-width: 400px) {
  .hero h1, .hero-split-text h1, .page-hero h1 { font-size: 1.9rem; }
  .hero-actions, .cta-actions { flex-direction: column; align-items: stretch; }
  .hero-actions .btn, .cta-actions .btn { justify-content: center; }
  .about-numbers { gap: 20px; }
}
