/* ===== Tokens (tomados del logo: azul noche, plateado, azul → cian) ===== */
:root {
  --bg: #050b17;
  --bg-2: #081426;
  --surface: rgba(255, 255, 255, 0.035);
  --surface-2: rgba(255, 255, 255, 0.06);
  --border: rgba(160, 200, 255, 0.12);
  --text: #e8eef7;
  --muted: #93a3bb;
  --silver: linear-gradient(180deg, #ffffff 0%, #c9d3e0 55%, #8e9bb0 100%);
  --blue: #1f6bff;
  --cyan: #19d3ff;
  --grad: linear-gradient(120deg, var(--blue) 0%, var(--cyan) 100%);
  --radius: 18px;
  --shadow-glow: 0 0 40px rgba(25, 160, 255, 0.35);
  --font-head: "Sora", system-ui, sans-serif;
  --font-body: "Inter", system-ui, sans-serif;
  color-scheme: dark;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; scroll-padding-top: 80px; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; }

.container { width: min(1180px, 100% - 32px); margin-inline: auto; }

h1, h2, h3 { font-family: var(--font-head); line-height: 1.15; letter-spacing: -0.02em; }
h1 { font-size: clamp(2.2rem, 5vw, 3.7rem); font-weight: 800; }
h2 { font-size: clamp(1.8rem, 3.5vw, 2.6rem); font-weight: 700; margin-bottom: 16px; }
h3 { font-size: 1.2rem; font-weight: 600; margin-bottom: 10px; }

.grad { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.muted { color: var(--muted); }
.lead { color: var(--muted); font-size: 1.15rem; max-width: 560px; margin: 22px 0 34px; }

.eyebrow {
  font-family: var(--font-head);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--cyan);
  margin-bottom: 18px;
}

/* ===== Botones ===== */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: 8px; padding: 14px 26px; border-radius: 999px;
  font-weight: 600; font-size: 0.98rem; cursor: pointer; border: 0;
  transition: transform .2s, box-shadow .2s, background .2s;
}
.btn--primary { background: var(--grad); color: #fff; box-shadow: 0 8px 30px rgba(31, 107, 255, 0.35); }
.btn--primary:hover { transform: translateY(-2px); box-shadow: 0 10px 40px rgba(25, 211, 255, 0.45); }
.btn--ghost { border: 1px solid var(--border); color: var(--text); background: var(--surface); }
.btn--ghost:hover { background: var(--surface-2); border-color: rgba(25, 211, 255, 0.4); }
.btn--sm { padding: 9px 18px; font-size: 0.9rem; }
.btn--block { width: 100%; }

/* ===== Marca (texto, nítida en cualquier tamaño) ===== */
.brand { display: inline-flex; align-items: center; gap: 10px; }
.brand__mark {
  font-family: var(--font-head); font-weight: 800; font-size: 1.6rem; letter-spacing: -0.04em;
  background: var(--silver); -webkit-background-clip: text; background-clip: text; color: transparent;
}
.brand__mark span { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; filter: drop-shadow(0 0 8px rgba(25, 211, 255, .5)); }
.brand__name { font-family: var(--font-head); font-size: 0.78rem; letter-spacing: 0.32em; color: #c9d3e0; font-weight: 600; }

/* ===== Nav ===== */
.nav { position: fixed; inset: 0 0 auto; z-index: 50; padding-top: env(safe-area-inset-top, 0px); transition: background .3s, border-color .3s; border-bottom: 1px solid transparent; }
.nav.is-scrolled { background: rgba(5, 11, 23, 0.82); backdrop-filter: blur(14px); border-color: var(--border); }
.nav__inner { display: flex; align-items: center; justify-content: space-between; height: 72px; }
.nav__links { display: flex; align-items: center; gap: 30px; font-size: 0.95rem; }
.nav__links a:not(.btn) { color: var(--muted); transition: color .2s; }
.nav__links a:not(.btn):hover { color: var(--text); }
.nav__toggle { display: none; background: none; border: 0; width: 40px; height: 40px; cursor: pointer; position: relative; }
.nav__toggle span { position: absolute; left: 9px; right: 9px; height: 2px; background: var(--text); border-radius: 2px; transition: transform .25s, top .25s; }
.nav__toggle span:first-child { top: 15px; }
.nav__toggle span:last-child { top: 23px; }
.nav__toggle[aria-expanded="true"] span:first-child { top: 19px; transform: rotate(45deg); }
.nav__toggle[aria-expanded="true"] span:last-child { top: 19px; transform: rotate(-45deg); }

/* ===== Hero ===== */
.hero { position: relative; display: flex; align-items: center; padding: 140px 0 100px; overflow: hidden; }
.hero__glow {
  position: absolute; width: 900px; height: 900px; right: -250px; top: -200px;
  background: radial-gradient(circle, rgba(31, 107, 255, 0.28) 0%, rgba(25, 211, 255, 0.08) 40%, transparent 70%);
  filter: blur(20px); pointer-events: none;
}
.hero__grid {
  position: absolute; inset: 0; pointer-events: none;
  background-image: linear-gradient(rgba(120, 170, 255, .06) 1px, transparent 1px), linear-gradient(90deg, rgba(120, 170, 255, .06) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(ellipse at 60% 40%, #000 20%, transparent 70%);
}
.hero__inner { position: relative; display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 60px; align-items: center; }
.hero__cta { display: flex; flex-wrap: wrap; gap: 14px; }
.hero__facts { display: flex; flex-wrap: wrap; gap: 34px; margin-top: 50px; padding-top: 28px; border-top: 1px solid var(--border); }
.hero__facts li { display: flex; flex-direction: column; }
.hero__facts strong { font-family: var(--font-head); font-size: 1.05rem; }
.hero__facts span { color: var(--muted); font-size: 0.88rem; }

/* Mockup */
.hero__visual { position: relative; height: 460px; }
.panel {
  position: absolute; top: 0; left: 0; width: 88%;
  background: linear-gradient(180deg, rgba(14, 30, 58, .9), rgba(8, 18, 36, .9));
  border: 1px solid var(--border); border-radius: var(--radius);
  box-shadow: 0 30px 80px rgba(0, 0, 0, .5), var(--shadow-glow);
  animation: float 7s ease-in-out infinite;
}
.panel__bar { display: flex; align-items: center; gap: 6px; padding: 12px 16px; border-bottom: 1px solid var(--border); font-size: .75rem; color: var(--muted); }
.panel__bar i { width: 9px; height: 9px; border-radius: 50%; background: rgba(255, 255, 255, .15); }
.panel__bar span { margin-left: 10px; }
.panel__body { padding: 20px; }
.kpis { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.kpi { background: var(--surface-2); border: 1px solid var(--border); border-radius: 12px; padding: 12px 14px; display: flex; flex-direction: column; }
.kpi small { color: var(--muted); font-size: .75rem; }
.kpi b { font-family: var(--font-head); font-size: 1.15rem; }
.kpi em { font-style: normal; font-size: .75rem; color: var(--cyan); }
.bars { display: flex; align-items: flex-end; gap: 10px; height: 150px; margin-top: 18px; padding: 10px 4px 0; }
.bars span { flex: 1; height: var(--h); border-radius: 6px 6px 2px 2px; background: var(--grad); opacity: .85; transform-origin: bottom; animation: grow 1.4s cubic-bezier(.2, .8, .2, 1) both; }
.bars span:nth-child(2) { animation-delay: .1s } .bars span:nth-child(3) { animation-delay: .2s }
.bars span:nth-child(4) { animation-delay: .3s } .bars span:nth-child(5) { animation-delay: .4s }
.bars span:nth-child(6) { animation-delay: .5s } .bars span:nth-child(7) { animation-delay: .6s }

.chat {
  position: absolute; right: 0; bottom: 0; width: 66%;
  background: rgba(10, 22, 44, .95); border: 1px solid rgba(25, 211, 255, .3);
  border-radius: var(--radius); padding: 14px; backdrop-filter: blur(10px);
  box-shadow: 0 30px 70px rgba(0, 0, 0, .55), 0 0 30px rgba(25, 211, 255, .2);
  animation: float 7s ease-in-out infinite reverse;
  display: flex; flex-direction: column; gap: 8px;
}
.chat__head { display: flex; align-items: center; gap: 8px; font-size: .78rem; color: var(--muted); padding-bottom: 8px; border-bottom: 1px solid var(--border); }
.dot { width: 8px; height: 8px; border-radius: 50%; background: #2ee59d; box-shadow: 0 0 8px #2ee59d; }
.msg { font-size: .82rem; padding: 8px 12px; border-radius: 14px; max-width: 88%; line-height: 1.45; }
.msg--in { background: var(--surface-2); align-self: flex-start; border-bottom-left-radius: 4px; }
.msg--out { background: linear-gradient(120deg, rgba(31, 107, 255, .9), rgba(25, 180, 255, .9)); align-self: flex-end; border-bottom-right-radius: 4px; }
.msg--typing { background: var(--surface-2); align-self: flex-start; display: flex; gap: 4px; padding: 10px 12px; }
.msg--typing i { width: 6px; height: 6px; border-radius: 50%; background: var(--muted); animation: blink 1.2s infinite; }
.msg--typing i:nth-child(2) { animation-delay: .2s } .msg--typing i:nth-child(3) { animation-delay: .4s }

@keyframes float { 0%, 100% { transform: translateY(0) } 50% { transform: translateY(-10px) } }
@keyframes grow { from { transform: scaleY(0) } to { transform: scaleY(1) } }
@keyframes blink { 0%, 100% { opacity: .3 } 50% { opacity: 1 } }

/* ===== Secciones ===== */
.section { padding: 110px 0; position: relative; }
.section--alt { background: linear-gradient(180deg, var(--bg) 0%, var(--bg-2) 50%, var(--bg) 100%); }
.section__head { max-width: 680px; margin-bottom: 56px; }

/* Cards de servicios */
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.card {
  position: relative; padding: 30px; border-radius: var(--radius);
  background: var(--surface); border: 1px solid var(--border);
  transition: transform .3s, border-color .3s, background .3s;
}
.card:hover { transform: translateY(-4px); border-color: rgba(25, 211, 255, .35); background: var(--surface-2); }
.card p { color: var(--muted); font-size: .95rem; }
.card--accent { background: linear-gradient(160deg, rgba(31, 107, 255, .16), rgba(25, 211, 255, .05)); border-color: rgba(25, 211, 255, .3); }
.card__icon {
  width: 50px; height: 50px; border-radius: 14px; display: grid; place-items: center; margin-bottom: 20px;
  background: linear-gradient(140deg, rgba(31, 107, 255, .25), rgba(25, 211, 255, .1)); border: 1px solid rgba(25, 211, 255, .25);
}
.card__icon svg { width: 24px; height: 24px; fill: none; stroke: var(--cyan); stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }

/* Split */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 70px; align-items: center; }
.checks { margin-top: 28px; display: grid; gap: 14px; }
.checks li { position: relative; padding-left: 34px; }
.checks li::before {
  content: ""; position: absolute; left: 0; top: 4px; width: 20px; height: 20px; border-radius: 50%;
  background: var(--grad) center / 100% no-repeat;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Ccircle cx='10' cy='10' r='10'/%3E%3C/svg%3E");
}
.checks li::after { content: ""; position: absolute; left: 7px; top: 8px; width: 5px; height: 9px; border: solid #fff; border-width: 0 2px 2px 0; transform: rotate(45deg); }

.ia-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.stat { padding: 30px 26px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--border); }
.stat b { display: block; font-family: var(--font-head); font-size: 2.6rem; font-weight: 800; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; line-height: 1.1; }
.stat span { color: var(--muted); font-size: .92rem; }
.stat small { display: block; font-size: .75rem; opacity: .7; }

/* Pasos */
.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; counter-reset: s; }
.step { padding: 28px 24px; border-radius: var(--radius); border: 1px solid var(--border); background: var(--surface); position: relative; }
.step::after { content: ""; position: absolute; top: 0; left: 24px; right: 24px; height: 2px; background: var(--grad); opacity: .7; border-radius: 2px; }
.step__n { display: block; font-family: var(--font-head); font-weight: 800; font-size: 2rem; color: transparent; -webkit-text-stroke: 1px rgba(25, 211, 255, .6); margin-bottom: 14px; }
.step p { color: var(--muted); font-size: .93rem; }

/* Proyectos */
.projects { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.project { padding: 30px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--border); display: flex; flex-direction: column; transition: border-color .3s; }
.project:hover { border-color: rgba(25, 211, 255, .35); }
.project p { color: var(--muted); font-size: .95rem; flex: 1; }
.tag { font-size: .75rem; color: var(--cyan); letter-spacing: .06em; margin-bottom: 12px; }
.pills { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 22px; }
.pills li { font-size: .78rem; padding: 5px 12px; border-radius: 999px; border: 1px solid var(--border); color: #c9d3e0; }

/* Contacto */
.contact { overflow: hidden; }
.contact__glow { position: absolute; width: 700px; height: 700px; left: -250px; bottom: -300px; background: radial-gradient(circle, rgba(31, 107, 255, .22), transparent 65%); pointer-events: none; }
.contact__list { margin-top: 30px; display: grid; gap: 16px; }
.contact__list li { display: flex; flex-direction: column; }
.contact__list span { font-size: .78rem; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.contact__list a { font-family: var(--font-head); font-size: 1.1rem; transition: color .2s; }
.contact__list a:hover { color: var(--cyan); }

.form { position: relative; padding: 34px; border-radius: 22px; background: rgba(10, 22, 44, .7); border: 1px solid var(--border); box-shadow: 0 30px 80px rgba(0, 0, 0, .35); display: grid; gap: 18px; }
.field { display: grid; gap: 6px; }
.field label { font-size: .85rem; color: var(--muted); }
.field input, .field select, .field textarea {
  width: 100%; padding: 13px 15px; border-radius: 12px; font: inherit; font-size: .95rem; color: var(--text);
  background: rgba(255, 255, 255, .04); border: 1px solid var(--border); transition: border-color .2s, box-shadow .2s; resize: vertical;
}
.field select option { background: var(--bg-2); }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--cyan); box-shadow: 0 0 0 3px rgba(25, 211, 255, .15); }
.form__note { font-size: .8rem; color: var(--muted); text-align: center; }

/* Footer */
.footer { border-top: 1px solid var(--border); padding: 40px 0; }
.footer__inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; }
.footer__tag { font-size: .75rem; letter-spacing: .25em; text-transform: uppercase; color: var(--muted); }
.footer__copy { font-size: .85rem; color: var(--muted); }

/* Animación al hacer scroll */
.reveal { transform: translateY(24px); transition: transform .7s ease; }
.reveal.is-visible { transform: none; }
.form__fallback { text-align: center; font-size: .9rem; }
.form__fallback a { color: var(--cyan); text-decoration: underline; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .reveal { transform: none; }
  html { scroll-behavior: auto; }
}

/* ===== Responsive ===== */
@media (max-width: 1000px) {
  .hero__inner, .split { grid-template-columns: 1fr; gap: 50px; }
  .hero__visual { height: 420px; max-width: 560px; }
  .cards, .projects { grid-template-columns: 1fr 1fr; }
  .steps { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 760px) {
  .nav__toggle { display: block; }
  .nav__links {
    position: fixed; top: 72px; left: 0; right: 0; flex-direction: column; align-items: stretch; gap: 0;
    background: rgba(5, 11, 23, .97); backdrop-filter: blur(14px); border-bottom: 1px solid var(--border);
    padding: 10px 16px 20px; transform: translateY(-120%); opacity: 0; transition: transform .3s, opacity .3s; pointer-events: none;
  }
  .nav__links.is-open { transform: none; opacity: 1; pointer-events: auto; }
  .nav__links a:not(.btn) { padding: 14px 4px; border-bottom: 1px solid var(--border); }
  .nav__links .btn { margin-top: 16px; }
  .nav { background: rgba(5, 11, 23, .82); backdrop-filter: blur(14px); }
  .section { padding: 80px 0; }
  .cards, .projects, .steps, .ia-stats { grid-template-columns: 1fr; }
  .hero__visual { height: 400px; }
  .panel { width: 100%; }
  .chat { width: 82%; }
  .form { padding: 24px; }
  .hero__facts { gap: 20px; }
}
