/* Base compartida del sitio LonkyDev (nuevoindex.html y las páginas de cada servicio).
   Sistema de marca v2.0: Violeta Real, Obsidian y Blanco; plano, sin sombras ni degradés.
   Cada página suma su propio <style> para lo que es sólo suyo. */

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

:root {
  /* Cada sección toma un tono de la escala de violetas que admite la marca. */
  --violet: #5a28d3;
  --violet-hi: #6b3be4;    /* hover: +8% de luz */
  --violet-lo: #8a63f0;
  --violet-pale: #a583f0;
  --violet-mist: #c9c2e8;  /* lila */
  --violet-soft: #ece9f6;  /* lavanda */
  --ink: #0a0a0f;          /* Obsidian */
  --ink-2: #14141b;
  --ink-line: #262631;
  --sheet: #ffffff;
  --canvas: #f6f6f9;
  --line: #e7e7ef;
  --mute: #5d5d6b;
  --mute-2: #a6a6b5;       /* text-2: sólo sobre superficies oscuras */
  --r: 16px;
  --rc: 10px;
  --maxw: 1120px;
  --gut: 24px;
}

html { scroll-behavior: smooth; }

body {
  background: var(--canvas);
  color: var(--ink);
  font-family: 'Satoshi', system-ui, sans-serif;
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

a { color: inherit; }
img { max-width: 100%; }
button { font: inherit; }
:focus-visible { outline: 2px solid var(--violet); outline-offset: 3px; border-radius: 4px; }

.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 var(--gut); }
.mono { font-family: 'JetBrains Mono', ui-monospace, monospace; }

h1, h2, h3 { text-wrap: balance; letter-spacing: -0.02em; }
h2 { font-size: clamp(30px, 4vw, 48px); font-weight: 900; line-height: 1.06; }
.kicker { font-family: 'JetBrains Mono', ui-monospace, monospace; font-size: 13px; color: var(--violet); }

/* Aparecen al entrar en pantalla. Sin JS, todo queda visible. */
.js .rev { opacity: 0; transform: translateY(18px); transition: opacity 0.6s ease, transform 0.6s ease; }
.js .rev.on { opacity: 1; transform: none; }

/* ── BARRA ── */
.top {
  position: sticky; top: 0; z-index: 40;
  background: var(--canvas);
  border-bottom: 1px solid transparent;
  transition: border-color 0.25s ease;
}
.top[data-stuck] { border-bottom-color: var(--line); }
.top-in { display: flex; align-items: center; gap: 14px; height: 64px; }
.logo {
  font-weight: 900; font-size: 21px; letter-spacing: -0.02em;
  text-decoration: none; margin-right: auto;
  display: inline-flex; align-items: center; gap: 10px; min-height: 44px;
}
.logo svg { width: 24px; height: 24px; fill: var(--violet); flex: none; }
.logo span span { color: var(--violet); }
.nav { display: flex; gap: 26px; margin-right: 12px; }
.nav a { text-decoration: none; font-size: 15px; font-weight: 500; color: var(--mute); }
.nav a:hover, .nav a[aria-current="page"] { color: var(--ink); }
.nav a[aria-current="page"] { font-weight: 700; }
.menu-btn {
  display: none; background: var(--sheet); border: 1px solid var(--line); border-radius: var(--rc);
  min-height: 44px; padding: 0 14px; font-weight: 700; font-size: 15px; cursor: pointer; color: var(--ink);
}

/* ── BOTONES ── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-weight: 700; font-size: 15px; letter-spacing: -0.01em;
  padding: 11px 20px; min-height: 44px; border-radius: var(--rc); text-decoration: none;
  border: 1px solid transparent; white-space: nowrap; cursor: pointer;
  transition: background-color 0.2s, border-color 0.2s;
}
.btn-fill { background: var(--violet); color: #fff; }
.btn-fill:hover { background: var(--violet-hi); }
.btn-ghost { border-color: var(--line); background: var(--sheet); }
.btn-ghost:hover { border-color: var(--violet-mist); }
.btn-lg { padding: 15px 28px; font-size: 17px; }
/* Botón que abre el chat: lleva el logo de WhatsApp, en el color del botón. */
.wa-ico { width: 20px; height: 20px; fill: currentColor; flex: none; }

/* ── PIEZAS QUE SE REPITEN ── */
.dots { display: flex; gap: 4px; align-items: center; }
.dots i { width: 6px; height: 6px; border-radius: 50%; background: currentColor; opacity: 0.7; animation: salta 0.9s ease-in-out infinite; }
.dots i:nth-child(2) { animation-delay: 0.15s; }
.dots i:nth-child(3) { animation-delay: 0.3s; }
@keyframes salta { 0%, 60%, 100% { transform: none; } 30% { transform: translateY(-4px); } }
@keyframes aparece { from { opacity: 0; transform: translateY(8px); } }

/* Migas: "Inicio / Servicio" arriba del título de cada página. */
.migas { font-family: 'JetBrains Mono', ui-monospace, monospace; font-size: 13px; color: var(--mute); }
.migas a { text-decoration: none; }
.migas a:hover { color: var(--violet); }

/* Preguntas frecuentes: <details> nativo, respuestas de una línea. */
.faq { margin-top: 40px; border-top: 1px solid var(--line); }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary {
  list-style: none; cursor: pointer; padding: 22px 0; font-size: 19px; font-weight: 700;
  display: flex; justify-content: space-between; gap: 16px; align-items: center;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-family: 'JetBrains Mono', ui-monospace, monospace; color: var(--violet); font-size: 22px; font-weight: 400; transition: transform 0.2s; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { padding: 0 0 22px; color: var(--mute); max-width: 60ch; }

/* Otros servicios: al pie de cada página de servicio. */
.otros { padding: 96px 0; background: var(--sheet); }
.otros-grid { margin-top: 32px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.otros-grid a {
  text-decoration: none; border-radius: var(--r); padding: 28px; min-height: 160px;
  display: flex; flex-direction: column; gap: 8px; transition: transform 0.25s ease;
}
.otros-grid a:hover { transform: translateY(-4px); }
.otros-grid h3 { font-size: 22px; font-weight: 900; }
.otros-grid p { font-size: 15px; opacity: 0.8; }
.otros-grid .ir { margin-top: auto; font-weight: 700; }
.t-medida { background: var(--violet-soft); }
.t-agentes { background: var(--ink); color: #fff; }
.t-crm { background: var(--violet-mist); }
.t-erp { background: var(--violet); color: #fff; }

/* ── CIERRE: lavanda ── */
.cierre { background: var(--violet-soft); padding: 112px 0; text-align: center; }
.cierre svg.iso { width: 56px; height: 56px; fill: var(--violet); }
.cierre h2 { margin: 24px auto 0; font-size: clamp(36px, 5.4vw, 64px); max-width: 14ch; }
.cierre p { margin-top: 16px; color: var(--mute); font-size: 18px; }
.cierre .acts { margin-top: 36px; display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.cierre .btn-ghost { background: transparent; border-color: var(--violet-mist); }
.cierre .btn-ghost:hover { border-color: var(--violet); }

/* ── PIE ── */
footer.pie { background: var(--ink); color: var(--mute-2); padding: 40px 0; font-size: 14px; }
.pie-in { display: flex; justify-content: space-between; align-items: center; gap: 20px; flex-wrap: wrap; }
.pie .logo { font-size: 18px; color: #fff; margin-right: 0; }
.pie .logo svg { width: 20px; height: 20px; fill: var(--violet-pale); }
.pie .logo span span { color: var(--violet-pale); }
.pie nav { display: flex; gap: 20px; flex-wrap: wrap; }
.pie nav a { text-decoration: none; min-height: 44px; display: inline-flex; align-items: center; }
.pie nav a:hover { color: #fff; }

@media (max-width: 960px) {
  .otros-grid { grid-template-columns: 1fr; }
  /* El menú se pliega en un botón. */
  .menu-btn { display: inline-flex; align-items: center; }
  .nav {
    display: none; position: absolute; top: 64px; left: 0; right: 0; margin: 0;
    flex-direction: column; gap: 0; background: var(--canvas); border-bottom: 1px solid var(--line);
    padding: 8px var(--gut) 16px;
  }
  .nav a { padding: 12px 0; font-size: 17px; border-bottom: 1px solid var(--line); }
  .nav a:last-child { border-bottom: 0; }
  .top[data-menu] .nav { display: flex; }
  .top[data-menu] { border-bottom-color: var(--line); }
}
@media (max-width: 760px) {
  :root { --gut: 16px; }
  .top-in .btn-fill { padding: 11px 14px; }
  .cierre { padding: 80px 0; }
  .cierre .acts .btn { width: 100%; }
  .otros { padding: 72px 0; }
}

/* En los celulares más angostos (360 px) logo + Menú + Escribinos no entran con los espacios normales. */
@media (max-width: 400px) {
  .top-in { gap: 8px; }
  .logo { font-size: 19px; gap: 8px; }
  .menu-btn { padding: 0 10px; font-size: 14px; }
  .top-in .btn-fill { padding: 11px 10px; font-size: 14px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
  .js .rev { opacity: 1; transform: none; }
}
