:root {
  /* Paleta Syncro Apps (logo y portada de Facebook) */
  --bg: #f5f8fc;          /* fondo general, blanco azulado */
  --bg2: #ffffff;         /* inputs y secciones alternas */
  --card: #ffffff;
  --card2: #eaf2fb;       /* azul muy claro */
  --line: #d6e2f0;
  --text: #1f2d3d;        /* gris oscuro del texto "APPS" */
  --muted: #5a6b80;
  --brand: #1565c0;       /* azul profundo del logo */
  --brand2: #1e9be8;      /* celeste de los nodos */
  --navy: #0d3b82;
  --ok: #16a34a;
  --warn: #d97706;
  --bad: #dc2626;
  --grad: linear-gradient(135deg, #0d47a1 0%, #1976d2 50%, #29a9ef 100%);
  --shadow: 0 6px 24px rgba(21, 101, 192, .08);
  --radius: 16px;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font-family: "Inter", system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  line-height: 1.55;
}
img { max-width: 100%; display: block; }
a { color: var(--brand2); }
.container { width: min(1140px, 100% - 32px); margin-inline: auto; }
.grad-text { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* Botones e inputs */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border: 0; border-radius: 12px; padding: 12px 20px; font: inherit; font-weight: 600;
  cursor: pointer; text-decoration: none; transition: transform .15s, opacity .15s, background .15s;
}
.btn:active { transform: scale(.97); }
.btn-primary { background: var(--grad); color: #fff; box-shadow: 0 4px 14px rgba(21,101,192,.3); }
.btn-primary:hover { opacity: .92; }
.btn-ghost { background: transparent; color: var(--text); border: 1px solid var(--line); }
.btn-ghost:hover { background: var(--card2); }
.btn-danger { background: transparent; color: var(--bad); border: 1px solid #f3c4c4; }
.btn-sm { padding: 7px 12px; font-size: .88rem; border-radius: 10px; }
.btn[disabled] { opacity: .5; cursor: not-allowed; }
label { display: block; font-size: .88rem; color: var(--muted); margin-bottom: 6px; }
input, select, textarea {
  width: 100%; background: var(--bg2); color: var(--text); border: 1px solid var(--line);
  border-radius: 10px; padding: 11px 12px; font: inherit;
}
input:focus, select:focus, textarea:focus { outline: 2px solid var(--brand); border-color: transparent; }
textarea { min-height: 90px; resize: vertical; }
input[type="checkbox"] { width: 18px; height: 18px; accent-color: var(--brand); }
.field { margin-bottom: 14px; }
.row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 640px) { .row { grid-template-columns: 1fr; } }

/* Navegación */
.nav {
  position: sticky; top: 0; z-index: 50; backdrop-filter: blur(12px);
  background: rgba(255, 255, 255, .9); border-bottom: 1px solid var(--line);
}
.nav .container { display: flex; align-items: center; justify-content: space-between; height: 64px; gap: 16px; }
.logo { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 1.2rem; color: var(--navy); text-decoration: none; letter-spacing: .01em; }
.logo img { height: 34px; }
.logo-mark { width: 32px; height: 32px; border-radius: 9px; background: var(--grad); display: grid; place-items: center; color: #fff; font-weight: 900; }
.nav-links { display: flex; gap: 22px; align-items: center; }
.nav-links a { color: var(--muted); text-decoration: none; font-weight: 500; }
.nav-links a:hover { color: var(--text); }
.nav-links a.btn-primary, .nav-links a.btn-primary:hover { color: #fff; }
@media (max-width: 760px) { .nav-links a:not(.btn) { display: none; } }

/* Hero */
.hero { padding: 80px 0 60px; position: relative; overflow: hidden; }
.hero::before {
  content: ""; position: absolute; inset: -40% -10% auto auto; width: 700px; height: 700px;
  background: radial-gradient(circle, rgba(30,155,232,.18), transparent 60%); pointer-events: none;
}
.hero-grid { display: grid; grid-template-columns: 1.1fr .9fr; gap: 40px; align-items: center; }
@media (max-width: 860px) { .hero-grid { grid-template-columns: 1fr; } }
.badge { display: inline-block; padding: 6px 12px; border-radius: 999px; background: var(--card2); border: 1px solid var(--line); color: var(--brand2); font-size: .85rem; font-weight: 600; }
.hero h1 { font-size: clamp(2rem, 5vw, 3.4rem); line-height: 1.1; margin: 18px 0; letter-spacing: -.02em; color: #3a4656; }
.hero p { color: var(--muted); font-size: 1.12rem; max-width: 560px; }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 26px; }
.hero-art {
  border-radius: 24px; border: 1px solid var(--line); background: var(--card); min-height: 320px;
  overflow: hidden; display: grid; place-items: center;
}
.hero-art img { width: 100%; height: 100%; object-fit: cover; }
.hero-art .mock { padding: 28px; width: 100%; }
.mock-line { height: 12px; border-radius: 6px; background: var(--card2); margin: 10px 0; }
.mock-line.b { background: var(--grad); width: 45%; }

/* Secciones */
section { padding: 70px 0; }
.section-head { text-align: center; max-width: 640px; margin: 0 auto 36px; }
.section-head h2 { font-size: clamp(1.6rem, 3.5vw, 2.3rem); margin: 0 0 8px; letter-spacing: -.01em; }
.section-head p { color: var(--muted); margin: 0; }
.alt { background: #eaf2fb; }

/* Catálogo */
.filters { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin-bottom: 28px; }
.chip { padding: 8px 16px; border-radius: 999px; border: 1px solid var(--line); background: transparent; color: var(--muted); cursor: pointer; font: inherit; font-weight: 500; }
.chip.active { background: var(--grad); color: #fff; border-color: transparent; }
.chip:not(.active):hover { border-color: var(--brand2); color: var(--brand); }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 20px; }
.card {
  box-shadow: var(--shadow);
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden;
  display: flex; flex-direction: column; transition: transform .2s, border-color .2s;
}
.card:hover { transform: translateY(-4px); border-color: var(--brand); }
.card-img { aspect-ratio: 16/9; background: var(--card2); display: grid; place-items: center; font-size: 3rem; }
.card-img img { width: 100%; height: 100%; object-fit: cover; }
.card-body { padding: 18px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.card-body h3 { margin: 0; font-size: 1.15rem; }
.card-body p { margin: 0; color: var(--muted); font-size: .95rem; flex: 1; }
.card-meta { display: flex; justify-content: space-between; align-items: center; margin-top: 8px; }
.price { font-weight: 800; font-size: 1.25rem; }
.price small { font-weight: 500; color: var(--muted); font-size: .8rem; display: block; }
.tag { font-size: .78rem; color: var(--brand2); font-weight: 600; text-transform: uppercase; letter-spacing: .05em; }

/* Pasos */
.steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 16px; counter-reset: s; }
.step { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; position: relative; }
.step::before {
  counter-increment: s; content: counter(s); width: 38px; height: 38px; border-radius: 10px;
  background: var(--grad); color: #fff; font-weight: 800; display: grid; place-items: center; margin-bottom: 12px;
}
.step h4 { margin: 0 0 6px; }
.step p { margin: 0; color: var(--muted); font-size: .93rem; }

/* Seguimiento */
.track-box { max-width: 560px; margin: 0 auto; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; }
.track-form { display: flex; gap: 10px; }
.track-form input { text-transform: uppercase; }
.timeline { list-style: none; padding: 0; margin: 20px 0 0; }
.timeline li { padding: 0 0 16px 26px; position: relative; border-left: 2px solid var(--line); margin-left: 8px; }
.timeline li::before { content: ""; position: absolute; left: -8px; top: 2px; width: 14px; height: 14px; border-radius: 50%; background: var(--brand); }
.timeline li:last-child { border-color: transparent; }
.timeline small { color: var(--muted); }

/* Estado */
.status { display: inline-block; padding: 4px 10px; border-radius: 999px; font-size: .8rem; font-weight: 700; background: var(--card2); }
.status[data-s="Recibido"] { color: var(--brand2); }
.status[data-s="En revisión"], .status[data-s="Esperando anticipo"] { color: var(--warn); }
.status[data-s="En desarrollo"] { color: var(--brand); }
.status[data-s="Entregado"] { color: var(--ok); }
.status[data-s="Cancelado"] { color: var(--bad); }

/* Nosotros + FAQ */
.about { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: center; }
@media (max-width: 860px) { .about { grid-template-columns: 1fr; } }
.about img { border-radius: var(--radius); border: 1px solid var(--line); }
.about p { color: var(--muted); font-size: 1.05rem; white-space: pre-line; }
.faq { max-width: 760px; margin: 0 auto; }
details { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 16px 18px; margin-bottom: 10px; }
summary { cursor: pointer; font-weight: 600; }
details p { color: var(--muted); margin: 10px 0 0; }

footer { border-top: 1px solid var(--line); padding: 30px 0; color: var(--muted); font-size: .9rem; }
footer .container { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px; }

/* Modal de pedido */
.modal { position: fixed; inset: 0; background: rgba(13,30,60,.55); z-index: 100; display: none; align-items: flex-start; justify-content: center; padding: 30px 16px; overflow-y: auto; }
.modal.open { display: flex; }
.modal-box { background: var(--bg2); border: 1px solid var(--line); border-radius: 20px; width: min(760px, 100%); padding: 26px; position: relative; }
.modal-close { position: absolute; right: 14px; top: 12px; background: none; border: 0; color: var(--muted); font-size: 1.6rem; cursor: pointer; }
.modal h3 { margin: 0 0 4px; font-size: 1.4rem; }
.modal .sub { color: var(--muted); margin: 0 0 18px; }
.progress { display: flex; gap: 6px; margin-bottom: 20px; }
.progress span { flex: 1; height: 5px; border-radius: 3px; background: var(--line); }
.progress span.on { background: var(--grad); }
.order-grid { display: grid; grid-template-columns: 1.3fr 1fr; gap: 20px; }
@media (max-width: 700px) { .order-grid { grid-template-columns: 1fr; } }
.opt { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; margin-bottom: 10px; }
.opt-check { display: flex; align-items: center; gap: 10px; cursor: pointer; margin: 0; color: var(--text); font-size: 1rem; }
.opt-check .p { margin-left: auto; color: var(--brand2); font-weight: 600; white-space: nowrap; }
.opt .hint { color: var(--muted); font-size: .82rem; }
.summary { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 16px; position: sticky; top: 0; align-self: start; }
.summary h4 { margin: 0 0 10px; }
.sum-line { display: flex; justify-content: space-between; gap: 10px; font-size: .9rem; padding: 4px 0; color: var(--muted); }
.sum-total { display: flex; justify-content: space-between; border-top: 1px solid var(--line); margin-top: 8px; padding-top: 10px; font-weight: 800; font-size: 1.3rem; }
.modal-actions { display: flex; justify-content: space-between; gap: 10px; margin-top: 18px; }
.success { text-align: center; padding: 10px 0; }
.code-big { font-size: 2rem; font-weight: 900; letter-spacing: .08em; margin: 10px 0; }
.note { color: var(--muted); font-size: .88rem; }
.demo-banner { background: #fff4d6; color: #8a5a00; text-align: center; font-size: .85rem; padding: 6px 12px; }

/* Toast */
.toast { position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%); background: var(--navy); color: #fff; border: 1px solid var(--line); padding: 12px 18px; border-radius: 12px; z-index: 200; display: none; }
.toast.show { display: block; }

/* Buscador, destacados y subtítulos del resumen */
.search { max-width: 560px; margin: 0 auto 16px; }
.search input { border-radius: 999px; padding: 13px 20px; box-shadow: var(--shadow); }
.card-img { position: relative; }
.star { position: absolute; top: 10px; left: 10px; background: #fff; color: var(--brand); font-size: .75rem; font-weight: 700; padding: 4px 10px; border-radius: 999px; box-shadow: var(--shadow); }
.sum-sub { font-size: .75rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--brand); margin: 10px 0 2px; }
.sum-total small { font-size: .78rem; font-weight: 500; display: block; text-align: right; }
.hero-art { box-shadow: var(--shadow); background: linear-gradient(160deg, #ffffff, #e3eefa); }
.mock-line { background: #d6e2f0; }

/* Celular: filtros en una fila deslizable y portada más compacta */
@media (max-width: 640px) {
  .filters { flex-wrap: nowrap; overflow-x: auto; justify-content: flex-start; padding-bottom: 6px; scrollbar-width: none; }
  .filters::-webkit-scrollbar { display: none; }
  .chip { flex: 0 0 auto; }
  .hero { padding: 40px 0 20px; }
  .hero-art { min-height: 180px; }
  section { padding: 50px 0; }
}

/* WhatsApp, Yape y pie de página */
.btn-wa { background: #25d366; color: #fff; box-shadow: 0 4px 14px rgba(37,211,102,.3); }
.btn-wa:hover { opacity: .92; }
.yape-box { margin: 16px auto 8px; max-width: 420px; border: 2px solid #742284; border-radius: 16px; padding: 18px; text-align: center; background: #fbf5fd; }
.yape-head { font-weight: 800; color: #742284; margin-bottom: 6px; }
.yape-amount { font-size: 1.8rem; font-weight: 900; color: var(--text); }
.yape-amount span { display: block; font-size: 1.05rem; font-weight: 700; color: #742284; }
.yape-qr { width: 180px; margin: 10px auto; border-radius: 12px; }
.yape-box p { margin: 6px 0; }
.yape-owner { margin-top: 12px; padding-top: 10px; border-top: 1px dashed #d6b5de; color: var(--text); }
.yape-owner small { color: var(--muted); }
.foot-links { display: flex; gap: 16px; flex-wrap: wrap; align-items: center; }
.foot-admin { color: var(--muted); text-decoration: none; border: 1px solid var(--line); padding: 6px 12px; border-radius: 999px; }
.foot-admin:hover { color: var(--brand); border-color: var(--brand); }

/* ===== Estilo editorial (títulos grandes, secciones numeradas) ===== */
.eyebrow { display: inline-flex; align-items: center; gap: 10px; color: var(--brand); font-size: .78rem; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; }
.eyebrow::before { content: ""; width: 26px; height: 2px; background: var(--brand); }
.big { font-size: clamp(2.2rem, 5.6vw, 4.2rem); line-height: 1.02; letter-spacing: -.035em; font-weight: 900; margin: 14px 0; color: #14233a; }
.lead { color: var(--muted); font-size: 1.12rem; max-width: 620px; }
.sec-num { font-family: ui-monospace, SFMono-Regular, Consolas, monospace; color: var(--brand); font-weight: 700; font-size: .85rem; letter-spacing: .08em; }
.section-head.left { text-align: left; margin-left: 0; }
.hero-tags { display: flex; gap: 18px; flex-wrap: wrap; margin-top: 26px; color: var(--muted); font-size: .75rem; font-weight: 700; letter-spacing: .12em; }
.hero-tags span::before { content: "●"; color: var(--brand); margin-right: 6px; font-size: .6rem; vertical-align: middle; }
.btn-outline { border: 1.5px solid var(--text); color: var(--text); background: transparent; }
.btn-outline:hover { background: var(--text); color: #fff; }
.nav-links a.btn-outline { color: var(--text); }
.nav-links a.btn-outline:hover { color: #fff; }

/* Tarjeta oscura "sistema conectado" */
.sys-card { background: #0b1f3f; border-radius: 26px; padding: 18px; color: #cfe3ff; box-shadow: 0 30px 60px rgba(13,59,130,.25); position: relative; overflow: hidden; }
.sys-card::before { content: ""; position: absolute; inset: 0; background-image: linear-gradient(rgba(255,255,255,.04) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.04) 1px, transparent 1px); background-size: 28px 28px; }
.sys-top, .sys-bottom { position: relative; display: flex; justify-content: space-between; font-family: ui-monospace, Consolas, monospace; font-size: .75rem; opacity: .85; }
.sys-top .dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: #29e07a; margin-right: 6px; box-shadow: 0 0 8px #29e07a; }
.sys-stage { position: relative; height: 300px; display: grid; place-items: center; }
.ring { position: absolute; border: 1px solid rgba(255,255,255,.12); border-radius: 50%; }
.ring.r1 { width: 260px; height: 260px; }
.ring.r2 { width: 180px; height: 180px; }
.core { width: 108px; height: 108px; border-radius: 50%; background: var(--grad); display: grid; place-items: center; align-content: center; text-align: center; color: #fff; font-weight: 900; font-size: 1.7rem; box-shadow: 0 0 40px rgba(41,169,239,.55); position: relative; z-index: 1; }
.core small { display: block; font-size: .55rem; letter-spacing: .2em; font-weight: 600; }
.node { position: absolute; font-family: ui-monospace, Consolas, monospace; font-size: .68rem; font-weight: 700; color: #9fd4ff; border: 1px solid rgba(159,212,255,.35); background: rgba(41,169,239,.12); padding: 4px 9px; border-radius: 7px; }
.sys-bottom { border-top: 1px solid rgba(255,255,255,.1); padding-top: 12px; }
.sys-bottom b { color: #7fe3ff; font-size: 1.1rem; }

/* Capacidades */
.caps { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; }
.cap { background: var(--card); border: 1px solid var(--line); border-radius: 18px; padding: 24px; box-shadow: var(--shadow); }
.cap .sec-num { display: block; margin-bottom: 14px; }
.cap h3 { margin: 0 0 10px; font-size: 1.15rem; }
.cap ul { margin: 0; padding-left: 18px; color: var(--muted); font-size: .93rem; }
.cta-band { background: #0b1f3f; color: #fff; border-radius: 26px; padding: clamp(28px, 5vw, 56px); display: flex; justify-content: space-between; align-items: center; gap: 20px; flex-wrap: wrap; }
.cta-band h2 { margin: 0; font-size: clamp(1.6rem, 3.5vw, 2.4rem); letter-spacing: -.02em; }
.cta-band p { color: #b8cbe6; margin: 8px 0 0; }

/* ===== Portal de clientes ===== */
.auth-grid { display: grid; grid-template-columns: 1.1fr .9fr; gap: 40px; align-items: center; padding: 56px 0; }
@media (max-width: 860px) { .auth-grid { grid-template-columns: 1fr; padding: 32px 0; } }
.auth-box { padding: 26px; }
.checks { list-style: none; padding: 0; margin: 18px 0; }
.checks li { padding: 6px 0 6px 30px; position: relative; }
.checks li::before { content: "✓"; position: absolute; left: 0; top: 5px; width: 20px; height: 20px; border-radius: 6px; background: var(--card2); color: var(--brand); font-weight: 900; display: grid; place-items: center; font-size: .8rem; }
.mini-templates { display: flex; flex-wrap: wrap; gap: 8px; }
.mini-chip { background: var(--card); border: 1px solid var(--line); border-radius: 999px; padding: 6px 12px; font-size: .85rem; }
.seg { display: flex; background: var(--card2); border-radius: 12px; padding: 4px; gap: 4px; margin-bottom: 18px; }
.seg-btn { flex: 1; border: 0; background: transparent; padding: 10px 14px; border-radius: 9px; font: inherit; font-weight: 700; color: var(--muted); cursor: pointer; white-space: nowrap; }
.seg-btn.active { background: #fff; color: var(--brand); box-shadow: var(--shadow); }
.portal-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; padding: 36px 0 22px; }
.portal-head .seg { margin: 0; }
#portalView { min-height: 60vh; padding-bottom: 40px; }
.feat { margin: 4px 0 0; padding-left: 18px; color: var(--muted); font-size: .9rem; flex: 1; }
.empty { text-align: center; padding: 40px 20px; }
.color-row { display: flex; align-items: center; gap: 10px; }
.color-row input[type=color] { width: 52px; height: 42px; padding: 3px; cursor: pointer; }
.img-pick { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.img-pick .thumb { width: 72px; height: 72px; border-radius: 12px; background: var(--bg); border: 1px dashed var(--line); display: grid; place-items: center; overflow: hidden; color: var(--muted); font-size: .75rem; text-align: center; }
.img-pick .thumb img { width: 100%; height: 100%; object-fit: contain; }

.proj { background: var(--card); border: 1px solid var(--line); border-left: 5px solid var(--accent, var(--brand)); border-radius: 18px; padding: 20px; margin-bottom: 16px; box-shadow: var(--shadow); }
.proj-head { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.proj-head h3 { margin: 0; font-size: 1.2rem; }
.proj-logo { width: 54px; height: 54px; border-radius: 14px; background: var(--card2); display: grid; place-items: center; font-size: 1.7rem; overflow: hidden; flex: 0 0 auto; }
.proj-logo img { width: 100%; height: 100%; object-fit: contain; }
.bar { height: 12px; background: var(--card2); border-radius: 999px; overflow: hidden; margin: 18px 0 8px; }
.bar-fill { height: 100%; background: var(--grad); border-radius: 999px; transition: width .8s ease; }
.bar-label { font-size: .92rem; color: var(--muted); }
.bar-label b { color: var(--text); font-size: 1.05rem; }
.stepper { list-style: none; padding: 0; margin: 18px 0 6px; display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; }
.stepper li { text-align: center; font-size: .72rem; color: var(--muted); font-weight: 600; }
.stepper li span { display: grid; place-items: center; width: 30px; height: 30px; margin: 0 auto 6px; border-radius: 50%; background: var(--card2); color: var(--muted); font-weight: 800; font-size: .8rem; }
.stepper li.done span { background: var(--brand); color: #fff; }
.stepper li.now span { background: #fff; color: var(--brand); border: 3px solid var(--brand2); box-shadow: 0 0 0 4px rgba(41,169,239,.18); }
.stepper li.now { color: var(--brand); }
@media (max-width: 640px) { .stepper { grid-template-columns: repeat(4, 1fr); row-gap: 12px; } }
.proj-actions { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-top: 14px; }
.proj-more { margin-top: 14px; background: var(--bg); }
.status[data-s="Diseño"], .status[data-s="Pruebas"] { color: var(--warn); }
.status[data-s="Desarrollo"] { color: var(--brand); }
.status[data-s="Publicada"] { color: var(--ok); }
