/* ===========================================================
   NTI SOLUTIONS — Landing
   Paleta de marca + sistema de diseño
   =========================================================== */
:root {
  /* Paleta KIT DE MARCA */
  --navy:        #13304F;
  --navy-900:    #0E2640;
  --navy-800:    #16385c;
  --blue:        #2C5A8F;
  --blue-light:  #5B8FC7;
  --cursor:      #7FB0E0;
  --ink:         #0A0A0A;

  /* Neutros */
  --white:       #ffffff;
  --paper:       #f6f9fc;
  --paper-2:     #eef4fa;
  --muted:       #5c6b7a;
  --line:        rgba(19, 48, 79, 0.10);

  /* Texto */
  --text:        #16273a;
  --text-soft:   #46586b;

  /* Sistema */
  --radius:      16px;
  --radius-sm:   10px;
  --maxw:        1160px;
  --gutter:      clamp(20px, 5vw, 48px);
  --shadow-sm:   0 2px 8px rgba(19,48,79,.06);
  --shadow:      0 12px 40px rgba(19,48,79,.12);
  --shadow-lg:   0 24px 60px rgba(19,48,79,.18);
  --grad:        linear-gradient(135deg, var(--blue) 0%, var(--navy) 100%);
  --grad-bright: linear-gradient(135deg, var(--cursor) 0%, var(--blue) 100%);
  --ease:        cubic-bezier(.16,.84,.44,1);
  --font:        'Inter', Helvetica, Arial, sans-serif;
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .001ms !important; transition-duration: .001ms !important; }
}
body {
  font-family: var(--font);
  color: var(--text);
  background: var(--white);
  line-height: 1.6;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
img, svg { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; }

.container { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: var(--gutter); }

.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 1000;
  background: var(--navy); color: #fff; padding: 12px 18px; border-radius: 0 0 8px 0;
}
.skip-link:focus { left: 0; }

/* ---------- Tipografía ---------- */
h1, h2, h3, h4 { line-height: 1.12; font-weight: 700; letter-spacing: -.02em; color: var(--navy); }
.grad-text {
  background: var(--grad-bright);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}

/* ---------- Botones ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  padding: 14px 26px; border-radius: 999px; font-weight: 600; font-size: .98rem;
  letter-spacing: .01em; transition: transform .25s var(--ease), box-shadow .25s var(--ease), background .25s;
  white-space: nowrap; cursor: pointer; will-change: transform;
}
.btn .icon { width: 18px; height: 18px; }
.btn-primary { background: var(--grad); color: #fff; box-shadow: 0 8px 24px rgba(44,90,143,.35); }
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 14px 34px rgba(44,90,143,.45); }
.btn-secondary { background: rgba(255,255,255,.08); color: #fff; border: 1px solid rgba(255,255,255,.28); }
.btn-secondary:hover { background: rgba(255,255,255,.16); transform: translateY(-2px); }
.btn-sm { padding: 10px 20px; font-size: .9rem; }
.btn-block { width: 100%; }
.section:not(.contact) .btn-secondary { color: var(--navy); border-color: var(--line); background: var(--white); }

/* ===========================================================
   HEADER
   =========================================================== */
.site-header {
  position: fixed; inset: 0 0 auto 0; z-index: 100;
  transition: background .3s, box-shadow .3s, padding .3s;
  padding: 18px 0;
}
.site-header.scrolled {
  background: rgba(19,48,79,.85);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  box-shadow: 0 1px 0 rgba(255,255,255,.08);
  padding: 12px 0;
}
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.brand-logo { height: 34px; width: auto; }
.main-nav { display: flex; gap: 30px; margin-left: auto; }
.main-nav a {
  color: rgba(255,255,255,.82); font-size: .95rem; font-weight: 500; position: relative; padding: 4px 0;
  transition: color .2s;
}
.main-nav a::after {
  content: ''; position: absolute; left: 0; bottom: -2px; height: 2px; width: 0;
  background: var(--cursor); transition: width .25s var(--ease);
}
.main-nav a:hover { color: #fff; }
.main-nav a:hover::after { width: 100%; }

.header-actions { display: flex; align-items: center; gap: 16px; }
.lang-toggle {
  display: flex; align-items: center; gap: 4px; color: rgba(255,255,255,.6);
  font-size: .85rem; font-weight: 600; letter-spacing: .04em;
}
.lang-toggle .lang-opt { transition: color .2s; padding: 2px; }
.lang-toggle .lang-opt.active { color: var(--cursor); }
.lang-toggle .lang-sep { opacity: .5; }

.nav-toggle { display: none; flex-direction: column; gap: 5px; padding: 8px; }
.nav-toggle span { width: 24px; height: 2px; background: #fff; border-radius: 2px; transition: .3s; }
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ===========================================================
   HERO
   =========================================================== */
.hero {
  position: relative; background: var(--navy); color: #fff; overflow: hidden;
  padding: clamp(120px, 18vh, 200px) 0 clamp(70px, 10vh, 120px);
}
.hero-bg { position: absolute; inset: 0; z-index: 0; }
.grid-glow {
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(127,176,224,.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(127,176,224,.06) 1px, transparent 1px);
  background-size: 54px 54px;
  mask-image: radial-gradient(ellipse 80% 60% at 50% 0%, #000 40%, transparent 100%);
  -webkit-mask-image: radial-gradient(ellipse 80% 60% at 50% 0%, #000 40%, transparent 100%);
}
.orb { position: absolute; border-radius: 50%; filter: blur(70px); opacity: .5; }
.orb-1 { width: 460px; height: 460px; background: radial-gradient(circle, var(--blue), transparent 70%); top: -120px; right: -80px; }
.orb-2 { width: 380px; height: 380px; background: radial-gradient(circle, var(--cursor), transparent 70%); bottom: -140px; left: -100px; opacity: .3; }

.hero-inner {
  position: relative; z-index: 1;
  display: grid; grid-template-columns: 1.05fr .95fr; gap: clamp(32px, 5vw, 72px); align-items: center;
}
.eyebrow {
  display: inline-block; font-size: .8rem; font-weight: 600; letter-spacing: .14em; text-transform: uppercase;
  color: var(--cursor); margin-bottom: 20px;
  padding: 6px 14px; border: 1px solid rgba(127,176,224,.3); border-radius: 999px; background: rgba(127,176,224,.06);
}
.hero-title {
  color: #fff; font-size: clamp(2.3rem, 5vw, 3.7rem); font-weight: 800; margin-bottom: 22px;
}
.hero-sub { font-size: clamp(1.05rem, 1.4vw, 1.22rem); color: rgba(255,255,255,.78); max-width: 30em; margin-bottom: 34px; }
.hero-ctas { display: flex; flex-wrap: wrap; gap: 14px; margin-bottom: 28px; }
.hero-trust { display: flex; flex-wrap: wrap; gap: 22px; color: rgba(255,255,255,.6); font-size: .9rem; font-weight: 500; }

/* Terminal */
.hero-terminal {
  background: rgba(10,18,30,.7); border: 1px solid rgba(127,176,224,.22); border-radius: var(--radius);
  box-shadow: var(--shadow-lg); backdrop-filter: blur(6px); overflow: hidden;
}
.terminal-bar {
  display: flex; align-items: center; gap: 8px; padding: 12px 16px;
  background: rgba(255,255,255,.04); border-bottom: 1px solid rgba(127,176,224,.15);
}
.terminal-bar .dot { width: 11px; height: 11px; border-radius: 50%; background: #44566b; }
.terminal-bar .dot:nth-child(1) { background: #ff5f57; }
.terminal-bar .dot:nth-child(2) { background: #febc2e; }
.terminal-bar .dot:nth-child(3) { background: #28c840; }
.terminal-title { margin-left: 10px; font-size: .8rem; color: rgba(255,255,255,.45); font-family: 'Inter', monospace; }
.terminal-body {
  padding: 22px 22px 26px; font-family: 'SF Mono', 'Fira Code', ui-monospace, Menlo, Consolas, monospace;
  font-size: clamp(.82rem, 1vw, .95rem); line-height: 1.85; color: #cfe0f2; min-height: 230px;
  white-space: pre-wrap; word-break: break-word;
}
.terminal-body .tok-prompt { color: var(--cursor); }
.terminal-body .tok-cmd { color: #fff; }
.terminal-body .tok-ok { color: #5fd38d; }
.terminal-body .tok-key { color: var(--blue-light); }
.caret { display: inline-block; color: var(--cursor); animation: blink 1s steps(1) infinite; font-weight: 700; }
@keyframes blink { 50% { opacity: 0; } }

/* ===========================================================
   STATS
   =========================================================== */
.stats { background: var(--navy-900); color: #fff; }
.stats-grid {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px;
  padding-block: 46px; text-align: center;
}
.stat { display: flex; flex-direction: column; gap: 8px; position: relative; }
.stat:not(:last-child)::after {
  content: ''; position: absolute; right: -12px; top: 10%; height: 80%; width: 1px; background: rgba(255,255,255,.1);
}
.stat-num {
  font-size: clamp(1.6rem, 3vw, 2.3rem); font-weight: 800; letter-spacing: -.02em;
  background: var(--grad-bright); -webkit-background-clip: text; background-clip: text; color: transparent;
}
.stat-label { font-size: .9rem; color: rgba(255,255,255,.62); max-width: 22ch; margin-inline: auto; }

/* ===========================================================
   SECTIONS GENERIC
   =========================================================== */
.section { padding-block: clamp(64px, 10vw, 110px); }
.section-alt { background: var(--paper); }
.section-head { max-width: 680px; margin: 0 auto clamp(40px, 6vw, 64px); text-align: center; }
.section-kicker {
  display: inline-block; font-size: .78rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase;
  color: var(--blue); margin-bottom: 14px;
}
.section-title { font-size: clamp(1.8rem, 3.4vw, 2.6rem); margin-bottom: 16px; }
.section-lead { font-size: clamp(1.02rem, 1.3vw, 1.16rem); color: var(--text-soft); }

/* ---------- Cards (servicios) ---------- */
.cards-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
.card {
  background: var(--white); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 30px 26px; box-shadow: var(--shadow-sm);
  transition: transform .3s var(--ease), box-shadow .3s var(--ease), border-color .3s;
  position: relative; overflow: hidden;
}
.card::before {
  content: ''; position: absolute; inset: 0 0 auto 0; height: 3px; background: var(--grad-bright);
  transform: scaleX(0); transform-origin: left; transition: transform .35s var(--ease);
}
.card:hover { transform: translateY(-6px); box-shadow: var(--shadow); border-color: transparent; }
.card:hover::before { transform: scaleX(1); }
.card-icon {
  display: inline-flex; align-items: center; justify-content: center; width: 52px; height: 52px;
  border-radius: 14px; background: var(--paper-2); color: var(--blue); font-size: 1.4rem; font-weight: 700;
  margin-bottom: 20px; font-family: ui-monospace, monospace;
}
.card h3 { font-size: 1.18rem; margin-bottom: 10px; }
.card p { color: var(--text-soft); font-size: .96rem; }

/* ---------- Features (por qué) ---------- */
.features-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 22px; }
.feature {
  background: var(--white); border-radius: var(--radius); padding: 28px 30px;
  border: 1px solid var(--line); box-shadow: var(--shadow-sm);
  border-left: 3px solid var(--blue-light);
}
.feature h3 { font-size: 1.15rem; margin-bottom: 8px; }
.feature p { color: var(--text-soft); font-size: .96rem; }

/* ---------- Steps (proceso) ---------- */
.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px; counter-reset: step; }
.step {
  position: relative; padding: 30px 24px; border-radius: var(--radius);
  background: var(--white); border: 1px solid var(--line);
}
.step-num {
  display: block; font-size: 2.2rem; font-weight: 800; line-height: 1;
  color: transparent; -webkit-text-stroke: 1.4px var(--blue-light); margin-bottom: 16px;
}
.step h3 { font-size: 1.1rem; margin-bottom: 8px; }
.step p { color: var(--text-soft); font-size: .93rem; }

/* ---------- Producto SaaS ---------- */
.product-inner { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(32px, 6vw, 72px); align-items: center; }
.product-inner .section-head { text-align: left; margin: 0; max-width: none; }
.product-inner .section-kicker { color: var(--blue); }
.product-list { margin: 24px 0 30px; display: grid; gap: 12px; }
.product-list li { position: relative; padding-left: 30px; color: var(--text-soft); }
.product-list li::before {
  content: '✓'; position: absolute; left: 0; top: 0; width: 20px; height: 20px; border-radius: 50%;
  background: var(--grad-bright); color: #fff; font-size: .7rem; display: grid; place-items: center;
}
.product-visual { perspective: 1200px; }
.mock-window {
  background: var(--white); border-radius: var(--radius); box-shadow: var(--shadow-lg);
  border: 1px solid var(--line); overflow: hidden; transform: rotateY(-6deg) rotateX(3deg); transition: transform .5s var(--ease);
}
.mock-window:hover { transform: rotateY(0) rotateX(0); }
.mock-bar { display: flex; gap: 7px; padding: 12px 16px; background: var(--paper); border-bottom: 1px solid var(--line); }
.mock-bar .dot { width: 10px; height: 10px; border-radius: 50%; background: #cdd9e5; }
.mock-body { padding: 22px; display: grid; gap: 16px; }
.mock-kpi { height: 70px; border-radius: 10px; background: linear-gradient(135deg, var(--paper-2), var(--white)); border: 1px solid var(--line); }
.mock-cols { display: grid; grid-template-columns: 1.6fr 1fr; gap: 16px; }
.mock-chart {
  height: 150px; border-radius: 10px;
  background:
    linear-gradient(to top, rgba(44,90,143,.18), transparent 70%),
    repeating-linear-gradient(90deg, transparent 0 26px, rgba(91,143,199,.10) 26px 28px);
  border: 1px solid var(--line); position: relative;
}
.mock-chart::after {
  content: ''; position: absolute; left: 8%; right: 4%; bottom: 18%; height: 2px;
  background: var(--blue); box-shadow: 0 0 0 4px rgba(44,90,143,.12);
  transform: rotate(-8deg); border-radius: 2px;
}
.mock-side { display: grid; gap: 12px; align-content: start; }
.mock-line { height: 14px; border-radius: 6px; background: var(--paper-2); }
.mock-line.short { width: 60%; }

/* ===========================================================
   CONTACTO
   =========================================================== */
.contact { background: var(--navy); color: #fff; position: relative; overflow: hidden; }
.contact .section-title { color: #fff; }
.contact .section-lead { color: rgba(255,255,255,.75); }
.contact .section-kicker { color: var(--cursor); }
.contact-grid { display: grid; grid-template-columns: 1fr 1.1fr; gap: clamp(28px, 5vw, 56px); align-items: start; max-width: 980px; margin-inline: auto; }
.contact-primary { display: grid; gap: 18px; }
.contact-action {
  display: flex; align-items: center; gap: 18px; padding: 22px 24px; border-radius: var(--radius);
  background: rgba(255,255,255,.05); border: 1px solid rgba(255,255,255,.14);
  transition: transform .25s var(--ease), background .25s, border-color .25s;
}
.contact-action:hover { transform: translateY(-3px); background: rgba(255,255,255,.09); border-color: rgba(127,176,224,.5); }
.contact-action .icon { width: 30px; height: 30px; flex: none; }
.contact-action.wa .icon { color: #25D366; }
.contact-action.cal .icon { color: var(--cursor); }
.contact-action span { display: flex; flex-direction: column; }
.contact-action strong { font-size: 1.05rem; }
.contact-action small { color: rgba(255,255,255,.6); font-size: .85rem; }

.contact-form {
  background: rgba(255,255,255,.04); border: 1px solid rgba(255,255,255,.12);
  border-radius: var(--radius); padding: 28px; display: grid; gap: 16px;
}
.form-intro { color: rgba(255,255,255,.7); font-size: .92rem; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.contact-form label { display: grid; gap: 6px; font-size: .85rem; color: rgba(255,255,255,.7); font-weight: 500; }
.contact-form input, .contact-form textarea {
  font-family: inherit; font-size: .96rem; color: #fff; padding: 12px 14px;
  background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.18); border-radius: var(--radius-sm);
  transition: border-color .2s, background .2s; resize: vertical;
}
.contact-form input::placeholder, .contact-form textarea::placeholder { color: rgba(255,255,255,.38); }
.contact-form input:focus, .contact-form textarea:focus {
  outline: none; border-color: var(--cursor); background: rgba(127,176,224,.1);
}
.form-status { font-size: .9rem; text-align: center; min-height: 1.2em; }
.form-status.ok { color: #5fd38d; }
.form-status.err { color: #ff7a7a; }

/* ===========================================================
   FOOTER
   =========================================================== */
.site-footer { background: var(--navy-900); color: rgba(255,255,255,.7); padding-top: 56px; }
.footer-inner { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 40px; padding-bottom: 40px; }
.footer-logo { height: 32px; margin-bottom: 16px; }
.footer-brand p { max-width: 32ch; font-size: .94rem; }
.footer-col h4 { color: #fff; font-size: .95rem; margin-bottom: 16px; }
.footer-col a, .footer-city { display: block; color: rgba(255,255,255,.66); font-size: .92rem; padding: 5px 0; transition: color .2s; }
.footer-col a:hover { color: var(--cursor); }
.footer-bottom {
  display: flex; align-items: center; justify-content: space-between;
  padding-block: 22px; border-top: 1px solid rgba(255,255,255,.08); font-size: .85rem; color: rgba(255,255,255,.5);
}
.footer-cursor { font-family: ui-monospace, monospace; color: var(--cursor); letter-spacing: 2px; }

/* ===========================================================
   REVEAL ANIMATIONS
   =========================================================== */
.reveal { opacity: 0; transform: translateY(26px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
.reveal.in { opacity: 1; transform: none; }
.cards-grid .reveal:nth-child(2), .features-grid .reveal:nth-child(2), .steps .reveal:nth-child(2), .stats-grid .reveal:nth-child(2) { transition-delay: .08s; }
.cards-grid .reveal:nth-child(3), .features-grid .reveal:nth-child(3), .steps .reveal:nth-child(3), .stats-grid .reveal:nth-child(3) { transition-delay: .16s; }
.cards-grid .reveal:nth-child(4), .steps .reveal:nth-child(4), .stats-grid .reveal:nth-child(4) { transition-delay: .24s; }

/* ===========================================================
   RESPONSIVE
   =========================================================== */
@media (max-width: 980px) {
  .hero-inner { grid-template-columns: 1fr; }
  .hero-terminal { order: -1; max-width: 520px; }
  .product-inner { grid-template-columns: 1fr; }
  .product-inner .section-head { text-align: center; }
  .contact-grid { grid-template-columns: 1fr; }
  .cards-grid { grid-template-columns: repeat(2, 1fr); }
  .steps { grid-template-columns: repeat(2, 1fr); }
  .stats-grid { grid-template-columns: repeat(2, 1fr); gap: 32px 24px; }
  .stat:nth-child(2)::after { display: none; }
}
@media (max-width: 760px) {
  .main-nav {
    position: fixed; inset: 0 0 0 auto; width: min(80vw, 320px); flex-direction: column; gap: 6px;
    background: var(--navy-800); padding: 100px 32px 40px; margin: 0;
    transform: translateX(100%); transition: transform .35s var(--ease); box-shadow: var(--shadow-lg);
  }
  .main-nav.open { transform: translateX(0); }
  .main-nav a { color: #fff; font-size: 1.1rem; padding: 12px 0; border-bottom: 1px solid rgba(255,255,255,.08); }
  .nav-toggle { display: flex; z-index: 110; }
  .header-cta { display: none; }
}
@media (max-width: 560px) {
  .features-grid, .cards-grid, .steps { grid-template-columns: 1fr; }
  .form-row { grid-template-columns: 1fr; }
  .footer-inner { grid-template-columns: 1fr; gap: 28px; }
  .footer-bottom { flex-direction: column; gap: 10px; text-align: center; }
  .hero-ctas .btn { flex: 1; }
}
