/* ===== Variables y base ===== */
:root {
  --azul: #6d4aff;       /* acento violeta-índigo */
  --azul-osc: #4c1fd1;
  --azul-claro: #a78bfa;
  --tinta: #0b0f24;      /* navy profundo elegante */
  --gris: #565b76;
  --gris-claro: #f6f5fd; /* lila muy suave */
  --borde: #e9e7f5;
  --blanco: #ffffff;
  --wa: #25d366;
  --radio: 16px;
  --sombra: 0 14px 40px rgba(20, 16, 60, .10);
  --max: 1140px;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  color: var(--tinta);
  line-height: 1.6;
  background: var(--blanco);
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 { font-family: 'Poppins', sans-serif; line-height: 1.15; letter-spacing: -.02em; }

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

.container { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 24px; }
.center { text-align: center; margin-top: 40px; }

.grad {
  background: linear-gradient(90deg, var(--azul), var(--azul-claro));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* ===== Botones ===== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-weight: 600;
  font-size: 15px;
  padding: 14px 24px;
  border-radius: 999px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform .15s ease, box-shadow .15s ease, background .15s ease;
}
.btn:hover { transform: translateY(-2px); }
.btn-sm { padding: 10px 18px; font-size: 14px; }
.btn-block { width: 100%; }
.btn-primary {
  background: linear-gradient(90deg, var(--azul), var(--azul-osc));
  color: #fff;
  box-shadow: 0 10px 24px rgba(109, 74, 255, .40);
}
.btn-ghost { background: transparent; color: var(--tinta); border-color: var(--borde); }
.btn-ghost:hover { border-color: var(--azul); color: var(--azul); }
.btn-wa { background: var(--wa); color: #fff; margin-top: 24px; box-shadow: 0 8px 20px rgba(37, 211, 102, .4); }

/* ===== Barra superior ===== */
.topbar { background: var(--tinta); color: #cbd5e1; font-size: 13px; }
.topbar-inner { display: flex; justify-content: space-between; align-items: center; height: 40px; gap: 16px; }
.topbar-contact { display: flex; gap: 22px; flex-wrap: wrap; }
.topbar a:hover { color: #fff; }
.topbar-social { display: flex; gap: 16px; }

/* ===== Header ===== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, .9);
  backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--borde);
}
.nav { display: flex; align-items: center; justify-content: space-between; height: 72px; }
.logo { font-family: 'Poppins', sans-serif; font-weight: 800; font-size: 24px; display: inline-flex; align-items: center; gap: 10px; }
.logo-mark { flex: 0 0 auto; display: block; object-fit: contain; }
.logo span { color: var(--azul); }
.logo-light { color: #fff; }
.logo-light span { color: var(--azul-claro); }
.nav-links { display: flex; align-items: center; gap: 26px; }
.nav-links a { font-weight: 500; color: var(--gris); transition: color .15s; }
.nav-links a:hover { color: var(--tinta); }
.nav-links .btn { color: #fff; }
.nav-toggle { display: none; flex-direction: column; gap: 5px; background: none; border: none; cursor: pointer; padding: 8px; }
.nav-toggle span { width: 24px; height: 2px; background: var(--tinta); border-radius: 2px; transition: .25s; }

/* Menú desplegable de servicios */
.nav-drop { position: relative; }
.nav-drop-toggle { display: inline-flex; align-items: center; gap: 5px; cursor: pointer; }
.nav-drop-toggle .caret { font-size: 10px; transition: transform .2s; }
.nav-drop:hover .nav-drop-toggle .caret { transform: rotate(180deg); }
.nav-drop-menu {
  position: absolute; top: calc(100% + 16px); left: 50%;
  transform: translateX(-50%) translateY(8px);
  background: #fff; border: 1px solid var(--borde); border-radius: 16px;
  padding: 10px; min-width: 230px; box-shadow: var(--sombra);
  opacity: 0; visibility: hidden; transition: opacity .2s, transform .2s; z-index: 60;
}
.nav-drop::before { content: ""; position: absolute; top: 100%; left: 0; right: 0; height: 18px; }
.nav-drop:hover .nav-drop-menu { opacity: 1; visibility: visible; transform: translateX(-50%) translateY(0); }
.nav-drop-menu a { display: block; padding: 10px 12px; border-radius: 10px; color: var(--gris); font-size: 14px; font-weight: 500; }
.nav-drop-menu a:hover { background: var(--gris-claro); color: var(--azul); }

/* ===== Hero ===== */
.hero {
  position: relative; overflow: hidden;
  padding: 100px 0 84px; color: #fff;
  background:
    radial-gradient(760px 420px at 10% -10%, rgba(167, 139, 250, .38), transparent 60%),
    radial-gradient(720px 520px at 96% 8%, rgba(109, 74, 255, .40), transparent 55%),
    linear-gradient(160deg, #0b0f24 0%, #161a3c 52%, #241a52 100%);
}
.hero-grid { display: grid; grid-template-columns: 1.1fr .9fr; gap: 48px; align-items: center; position: relative; z-index: 1; }
.badge {
  display: inline-block;
  background: rgba(255, 255, 255, .08);
  border: 1px solid rgba(255, 255, 255, .2);
  border-radius: 999px;
  padding: 8px 16px;
  font-size: 13px;
  font-weight: 500;
  color: #e9e7fb;
  backdrop-filter: blur(8px);
  margin-bottom: 24px;
}
.hero h1 { font-size: clamp(34px, 5vw, 56px); font-weight: 800; color: #fff; }
.hero .lead { font-size: 19px; color: #c6c8e2; margin: 20px 0 28px; max-width: 540px; }
.hero-cta { display: flex; gap: 14px; flex-wrap: wrap; }
.hero .btn-ghost { color: #fff; border-color: rgba(255, 255, 255, .32); }
.hero .btn-ghost:hover { border-color: #fff; color: #fff; background: rgba(255, 255, 255, .08); }
.hero-stats { display: flex; gap: 36px; margin-top: 44px; flex-wrap: wrap; }
.hero-stats strong { display: block; font-family: 'Poppins', sans-serif; font-size: 28px; color: #c4b5fd; }
.hero-stats span { font-size: 14px; color: #b6b9d6; }

/* ===== Mockup navegador (hero) ===== */
.hero-visual { display: flex; justify-content: center; }
.browser-mock {
  width: 100%; max-width: 420px;
  background: #fff; border: 1px solid rgba(255, 255, 255, .14);
  border-radius: 14px; box-shadow: 0 30px 70px rgba(5, 3, 30, .55); overflow: hidden;
}
.browser-bar { display: flex; align-items: center; gap: 6px; padding: 12px 14px; background: var(--gris-claro); border-bottom: 1px solid var(--borde); }
.browser-bar i { width: 11px; height: 11px; border-radius: 50%; background: #cbd5e1; }
.browser-bar i:nth-child(1) { background: #f87171; }
.browser-bar i:nth-child(2) { background: #fbbf24; }
.browser-bar i:nth-child(3) { background: #34d399; }
.browser-bar span { margin-left: 10px; font-size: 12px; color: var(--gris); }
.browser-body { padding: 20px; }
.bm-hero { height: 90px; border-radius: 10px; background: linear-gradient(135deg, var(--azul), var(--azul-claro)); margin-bottom: 16px; }
.bm-row { display: flex; gap: 10px; margin-bottom: 16px; }
.bm-row span { flex: 1; height: 46px; border-radius: 8px; background: var(--gris-claro); }
.bm-line { height: 12px; border-radius: 6px; background: var(--gris-claro); margin-bottom: 10px; }
.bm-line.short { width: 60%; }
.bm-btn { width: 120px; height: 34px; border-radius: 8px; background: var(--azul); margin-top: 14px; }

/* ===== Marcas ===== */
.brands { padding: 36px 0; border-top: 1px solid var(--borde); border-bottom: 1px solid var(--borde); }
.brands-title { text-align: center; font-size: 14px; color: var(--gris); margin-bottom: 18px; }
.brands-row { display: flex; justify-content: center; flex-wrap: wrap; gap: 40px; }
.brands-row span { font-family: 'Poppins', sans-serif; font-weight: 700; font-size: 22px; color: #cbd5e1; }

/* ===== Secciones ===== */
.section { padding: 88px 0; }
.section-alt { background: var(--gris-claro); }
.section-head { text-align: center; max-width: 640px; margin: 0 auto 52px; }
.eyebrow { display: inline-block; font-weight: 700; font-size: 13px; letter-spacing: .08em; text-transform: uppercase; color: var(--azul); margin-bottom: 12px; }
.eyebrow.light { color: #bfdbfe; }
.section-head h2, .split h2 { font-size: clamp(28px, 4vw, 40px); font-weight: 700; }
.section-head p { color: var(--gris); font-size: 18px; margin-top: 14px; }

/* ===== Cards (servicios / testimonios) ===== */
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.card {
  background: #fff;
  border: 1px solid var(--borde);
  border-radius: var(--radio);
  padding: 30px;
  transition: transform .2s, box-shadow .2s, border-color .2s;
}
.card:hover { transform: translateY(-6px); box-shadow: var(--sombra); border-color: var(--azul-claro); }
.card-icon { font-size: 32px; margin-bottom: 14px; }
.card h3 { font-size: 20px; margin-bottom: 8px; }
.card p { color: var(--gris); font-size: 15px; }

/* ===== Beneficios ===== */
.benefits { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.benefit {
  display: flex; gap: 16px; align-items: flex-start;
  background: #fff; border: 1px solid var(--borde);
  border-radius: var(--radio); padding: 26px;
}
.benefit-icon {
  flex: 0 0 50px; width: 50px; height: 50px;
  display: grid; place-items: center; font-size: 24px;
  background: #f1ecff; border-radius: 12px;
}
.benefit h3 { font-size: 18px; margin-bottom: 4px; }
.benefit p { color: var(--gris); font-size: 14px; }

/* ===== Servicios (estilo agencia) ===== */
.services-title { text-align: center; font-size: clamp(28px, 4.4vw, 44px); font-weight: 800; color: var(--tinta); max-width: 900px; margin: 0 auto 34px; line-height: 1.12; }
.services-features { display: flex; flex-wrap: wrap; justify-content: center; gap: 16px 44px; margin-bottom: 64px; }
.sfeat { display: inline-flex; align-items: center; gap: 10px; font-weight: 600; font-size: 15.5px; color: var(--tinta); }
.sfeat-check {
  width: 26px; height: 26px; border-radius: 50%; flex: 0 0 auto;
  background: linear-gradient(135deg, var(--azul), var(--azul-claro));
  color: #fff; font-size: 13px; display: grid; place-items: center;
  box-shadow: 0 4px 12px rgba(109, 74, 255, .35);
}
.services-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 44px 40px; position: relative; }
.services-grid::before {
  content: ""; position: absolute; right: 4%; top: 28%;
  width: 360px; height: 360px; border-radius: 50%;
  background: radial-gradient(circle, rgba(109, 74, 255, .07), transparent 70%);
  pointer-events: none; z-index: 0;
}
.service { position: relative; z-index: 1; }
.service-ico {
  width: 52px; height: 52px; border-radius: 13px;
  background: var(--tinta); display: grid; place-items: center;
  margin-bottom: 18px; transition: transform .2s, box-shadow .2s;
}
.service:hover .service-ico { transform: translateY(-4px); box-shadow: 0 10px 22px rgba(11, 15, 36, .25); }
.service-ico svg { width: 24px; height: 24px; color: #fff; }
.service h3 { font-size: 20px; margin-bottom: 8px; }
.service p { color: var(--gris); font-size: 15px; margin-bottom: 14px; }
.service-link { display: inline-flex; align-items: center; gap: 6px; font-weight: 700; font-size: 14px; color: var(--tinta); transition: gap .15s, color .15s; }
.service-link:hover { color: var(--azul); gap: 10px; }

/* ===== Modelos / Plantillas ===== */
.models { display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px; }
.model { text-align: center; cursor: pointer; outline: none; }
.model:focus-visible .model-thumb { box-shadow: 0 0 0 3px rgba(37, 99, 235, .35); }
.model-thumb {
  height: 150px; border-radius: var(--radio);
  display: grid; place-items: center; font-size: 52px;
  background: linear-gradient(135deg, #f3f0ff, #e7e0ff);
  border: 1px solid var(--borde);
  transition: transform .2s, box-shadow .2s;
  margin-bottom: 14px; position: relative; overflow: hidden;
}
.model-thumb::after {
  content: attr(data-cat);
  position: absolute; bottom: 0; left: 0; right: 0;
  background: rgba(37, 99, 235, .92); color: #fff;
  font-family: 'Inter', sans-serif; font-size: 13px; font-weight: 600;
  padding: 8px; transform: translateY(100%); transition: transform .2s;
}
.model:hover .model-thumb, .model:focus-visible .model-thumb { transform: translateY(-6px); box-shadow: var(--sombra); }
.model:hover .model-thumb::after, .model:focus-visible .model-thumb::after { transform: none; }
.model h3 { font-size: 16px; }
.model-link { display: inline-block; margin-top: 4px; font-size: 13px; font-weight: 600; color: var(--azul); opacity: 0; transition: opacity .2s; }
.model:hover .model-link, .model:focus-visible .model-link { opacity: 1; }

/* ===== Modal ===== */
.modal { position: fixed; inset: 0; z-index: 100; display: none; }
.modal.open { display: block; }
.modal-overlay { position: absolute; inset: 0; background: rgba(15, 23, 42, .55); backdrop-filter: blur(3px); animation: fade .2s ease; }
.modal-dialog {
  position: relative; z-index: 1;
  width: calc(100% - 40px); max-width: 920px;
  max-height: calc(100vh - 60px); overflow-y: auto;
  margin: 40px auto; background: #fff;
  border-radius: 22px; padding: 36px;
  box-shadow: 0 30px 80px rgba(15, 23, 42, .35);
  animation: pop .25s ease;
}
@keyframes fade { from { opacity: 0; } }
@keyframes pop { from { opacity: 0; transform: translateY(20px) scale(.98); } }
.modal-close {
  position: absolute; top: 16px; right: 18px;
  width: 38px; height: 38px; border-radius: 50%;
  border: none; background: var(--gris-claro); color: var(--tinta);
  font-size: 22px; line-height: 1; cursor: pointer; transition: background .15s;
}
.modal-close:hover { background: #e2e8f0; }
.modal-head { text-align: center; max-width: 560px; margin: 0 auto 28px; }
.modal-head h3 { font-size: 28px; }
.modal-head p { color: var(--gris); margin-top: 8px; }
.modal-foot { text-align: center; margin-top: 30px; }

.plantillas-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.plantilla { display: block; color: inherit; border: 1px solid var(--borde); border-radius: 14px; overflow: hidden; transition: transform .2s, box-shadow .2s, border-color .2s; }
.plantilla:hover { transform: translateY(-5px); box-shadow: var(--sombra); border-color: var(--azul-claro); }
.pl-info { padding: 14px 16px; }
.pl-info h4 { font-size: 15px; margin-bottom: 2px; }
.pl-info small { color: var(--azul); font-size: 13px; font-weight: 600; }

/* ===== Maquetas de plantilla (mini sitios) ===== */
.pl-preview { height: 200px; padding: 10px; background: #fff; border-bottom: 1px solid var(--borde); overflow: hidden; }
.m { height: 100%; display: flex; flex-direction: column; gap: 7px; font-size: 0; }
.m-nav { display: flex; align-items: center; gap: 5px; padding-bottom: 6px; border-bottom: 1px solid #eef2f7; }
.m-nav.center { justify-content: center; }
.m-nav i { width: 18px; height: 8px; border-radius: 3px; background: var(--ac); }
.m-nav b { width: 18px; height: 5px; border-radius: 3px; background: #cbd5e1; }
.m-hero { height: 64px; border-radius: 8px; background: linear-gradient(135deg, var(--ac), color-mix(in srgb, var(--ac) 55%, #fff)); }
.m-h { width: 70%; height: 9px; border-radius: 4px; background: #e2e8f0; }
.m-cols { display: flex; gap: 6px; flex: 1; }
.m-cols span { flex: 1; border-radius: 6px; background: #f1f5f9; border-top: 4px solid var(--ac); }
.m-split { display: flex; gap: 7px; height: 70px; }
.m-txt { flex: 1; display: flex; flex-direction: column; gap: 5px; justify-content: center; }
.m-txt u { height: 7px; border-radius: 4px; background: #e2e8f0; }
.m-txt u.s { width: 60%; }
.m-txt k { width: 42px; height: 14px; border-radius: 7px; background: var(--ac); margin-top: 3px; }
.m-img { width: 42%; border-radius: 8px; background: linear-gradient(135deg, var(--ac), color-mix(in srgb, var(--ac) 55%, #fff)); }
.m-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 6px; flex: 1; }
.m-grid span { border-radius: 6px; background: #f1f5f9; border-left: 4px solid var(--ac); }
.m-banner { height: 80px; border-radius: 8px; background: linear-gradient(135deg, var(--ac), color-mix(in srgb, var(--ac) 45%, #fff)); }
.m-gallery { display: flex; gap: 6px; flex: 1; }
.m-gallery span { flex: 1; border-radius: 6px; background: #f1f5f9; border-bottom: 4px solid var(--ac); }

/* ===== Split (responsive) ===== */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: center; }
.split .lead { color: var(--gris); font-size: 18px; margin: 16px 0 24px; }
.checklist { list-style: none; display: grid; gap: 12px; }
.checklist li { position: relative; padding-left: 32px; font-weight: 500; }
.checklist li::before {
  content: "✓";
  position: absolute; left: 0; top: 0;
  width: 22px; height: 22px;
  background: var(--azul); color: #fff;
  border-radius: 50%; font-size: 13px;
  display: grid; place-items: center;
}

/* ===== Dispositivos (responsive) ===== */
.devices { position: relative; height: 320px; display: flex; align-items: center; justify-content: center; }
.device { background: #1e293b; border-radius: 18px; box-shadow: var(--sombra); position: relative; }
.device span { position: absolute; inset: 10px; border-radius: 8px; background: linear-gradient(135deg, var(--azul), var(--azul-claro)); }
.device-laptop { width: 340px; height: 215px; border-radius: 14px 14px 4px 4px; }
.device-laptop::after { content: ""; position: absolute; bottom: -14px; left: -30px; right: -30px; height: 14px; background: #334155; border-radius: 0 0 12px 12px; }
.device-phone { width: 90px; height: 180px; position: absolute; right: 30px; bottom: 0; border-radius: 16px; border: 3px solid #334155; }
.device-phone span { inset: 6px; border-radius: 10px; }

/* ===== Testimonios ===== */
.quote { background: #fff; border: 1px solid var(--borde); border-radius: var(--radio); padding: 30px; }
.quote > p { font-size: 16px; color: var(--tinta); margin-bottom: 22px; }
.quote-author { display: flex; align-items: center; gap: 12px; }
.avatar { width: 44px; height: 44px; border-radius: 50%; background: linear-gradient(135deg, var(--azul), var(--azul-claro)); color: #fff; display: grid; place-items: center; font-weight: 700; }
.quote-author strong { display: block; font-size: 15px; }
.quote-author small { color: var(--gris); }

/* ===== Contacto ===== */
.contact-box {
  display: grid; grid-template-columns: 1fr 1fr; gap: 48px;
  background: linear-gradient(135deg, var(--azul-osc), var(--azul));
  border-radius: 28px; padding: 56px; color: #fff;
  align-items: center;
}
.contact-text h2 { font-size: clamp(26px, 3.5vw, 36px); }
.contact-text p { color: #dbeafe; margin-top: 14px; font-size: 17px; }
.contact-form { background: #fff; border-radius: var(--radio); padding: 28px; }
.field { margin-bottom: 16px; }
.field label { display: block; font-size: 14px; font-weight: 600; color: var(--tinta); margin-bottom: 6px; }
.field input, .field textarea, .field select {
  width: 100%; padding: 12px 14px; font: inherit;
  border: 1px solid var(--borde); border-radius: 10px; color: var(--tinta);
  background: #fff;
  transition: border-color .15s, box-shadow .15s;
}
.field input:focus, .field textarea:focus, .field select:focus { outline: none; border-color: var(--azul); box-shadow: 0 0 0 3px rgba(109, 74, 255, .18); }
.field textarea { resize: vertical; }
.form-msg { margin-top: 12px; font-size: 14px; font-weight: 600; min-height: 20px; }
.form-msg.ok { color: #16a34a; }
.form-msg.err { color: #dc2626; }

/* ===== Footer ===== */
.site-footer { background: var(--tinta); color: #cbd5e1; padding: 64px 0 28px; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 32px; }
.footer-grid p { margin-top: 14px; font-size: 14px; max-width: 280px; }
.footer-grid h4 { color: #fff; font-size: 15px; margin-bottom: 14px; }
.footer-grid a { display: block; color: #cbd5e1; font-size: 14px; padding: 4px 0; transition: color .15s; }
.footer-grid a:hover { color: #fff; }
.footer-bottom { margin-top: 44px; padding-top: 22px; border-top: 1px solid #1e293b; font-size: 13px; color: #94a3b8; }

/* ===== WhatsApp flotante ===== */
.wa-float {
  position: fixed; right: 22px; bottom: 22px; z-index: 60;
  width: 58px; height: 58px; border-radius: 50%;
  background: var(--wa); color: #fff; font-size: 28px;
  display: grid; place-items: center;
  box-shadow: 0 8px 24px rgba(37, 211, 102, .5);
  transition: transform .2s;
}
.wa-float:hover { transform: scale(1.08); }

/* ===== Animación de aparición ===== */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .6s ease, transform .6s ease; }
.reveal.visible { opacity: 1; transform: none; }

/* ===== Responsive ===== */
@media (max-width: 880px) {
  .hero-grid, .split, .contact-box { grid-template-columns: 1fr; }
  .cards, .benefits { grid-template-columns: repeat(2, 1fr); }
  .services-grid { grid-template-columns: repeat(2, 1fr); }
  .services-grid::before { display: none; }
  .models { grid-template-columns: repeat(3, 1fr); }
  .plantillas-grid { grid-template-columns: 1fr 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .hero-visual { order: -1; }
  .contact-box { padding: 36px; }
  .topbar-social { display: none; }
}

@media (max-width: 620px) {
  .nav-links {
    position: fixed; top: 72px; right: 0;
    flex-direction: column; align-items: flex-start;
    background: #fff; width: 72%; height: calc(100vh - 72px);
    padding: 28px; gap: 18px; box-shadow: var(--sombra);
    transform: translateX(100%); transition: transform .25s ease;
  }
  .nav-links.open { transform: none; overflow-y: auto; }
  .nav-toggle { display: flex; }
  .nav-drop-menu {
    position: static; transform: none; opacity: 1; visibility: visible;
    box-shadow: none; border: none; padding: 4px 0 4px 14px; min-width: 0;
    border-left: 2px solid var(--borde);
  }
  .nav-drop-toggle .caret { display: none; }
  .cards, .benefits, .models, .plantillas-grid, .services-grid { grid-template-columns: 1fr; }
  .services-features { gap: 14px 24px; }
  .modal-dialog { padding: 26px 20px; }
  .footer-grid { grid-template-columns: 1fr; }
  .section { padding: 60px 0; }
  .topbar-contact { gap: 14px; }
  .topbar-contact span { display: none; }
}
