/* ===================================================================
   GESTIFY — design tokens
   bg ink #0A0D12 · surface #121620 · border #1F2530
   accent (marca) #5B6EFF "pulso" · accent (estado) #34D399 "en línea"
   accent (código) #F5A623 "syntax" — uso muy restringido
=================================================================== */

:root{
  --ink: #0A0D12;
  --surface: #121620;
  --surface-2: #161B27;
  --border: #1F2530;
  --border-soft: #181E29;

  --text: #EAEDF2;
  --text-muted: #8A93A3;
  --text-faint: #565F70;

  --pulso: #5B6EFF;
  --pulso-soft: rgba(91,110,255,.14);
  --online: #34D399;
  --online-soft: rgba(52,211,153,.14);
  --syntax: #F5A623;

  --font-display: "Space Grotesk", system-ui, sans-serif;
  --font-body: "Inter", system-ui, sans-serif;
  --font-mono: "JetBrains Mono", "SF Mono", monospace;

  --radius: 14px;
  --radius-sm: 8px;
  --container: 1180px;

  --ease: cubic-bezier(.22,.61,.36,1);
}

@media (prefers-reduced-motion: reduce){
  *, *::before, *::after{
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
    scroll-behavior: auto !important;
  }
}

/* ============ RESET ============ */
*{ box-sizing: border-box; }
html{ scroll-behavior: smooth; }
body, h1, h2, h3, p, ul, figure{ margin: 0; }
ul{ padding: 0; list-style: none; }
img, svg{ display: block; max-width: 100%; }
a{ color: inherit; text-decoration: none; }
button{ font: inherit; cursor: pointer; }
input, textarea{ font: inherit; }

body{
  background: var(--ink);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

:focus-visible{
  outline: 2px solid var(--pulso);
  outline-offset: 3px;
  border-radius: 4px;
}

/* ============ STATUS DOT (signature motif) ============ */
.status-dot{
  display: inline-block;
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--online);
  box-shadow: 0 0 0 0 rgba(52,211,153,.6);
  margin-right: 8px;
  position: relative;
  top: -1px;
  animation: pulse 2.4s var(--ease) infinite;
}
.status-dot--sm{ width: 6px; height: 6px; margin-right: 6px; }
@keyframes pulse{
  0%   { box-shadow: 0 0 0 0 rgba(52,211,153,.55); }
  70%  { box-shadow: 0 0 0 6px rgba(52,211,153,0); }
  100% { box-shadow: 0 0 0 0 rgba(52,211,153,0); }
}

/* ============ BUTTONS ============ */
.btn{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 15px;
  padding: 13px 24px;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  transition: transform .18s var(--ease), background .18s var(--ease), border-color .18s var(--ease);
  white-space: nowrap;
}
.btn--primary{
  background: var(--pulso);
  color: #fff;
}
.btn--primary:hover{ background: #6E7CFF; transform: translateY(-1px); }
.btn--ghost{
  background: transparent;
  border-color: var(--border);
  color: var(--text);
}
.btn--ghost:hover{ border-color: var(--pulso); color: var(--pulso); }
.btn--sm{ padding: 9px 16px; font-size: 14px; }
.btn--block{ width: 100%; }

/* ============ NAV ============ */
.nav{
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(10,13,18,.78);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border-soft);
}
.nav__inner{
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}
.nav__logo{
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 20px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.nav__dot{
  width: 9px; height: 9px;
  border-radius: 3px;
  background: var(--pulso);
  display: inline-block;
}
.nav__links{
  display: flex;
  gap: 32px;
}
.nav__links a{
  font-size: 14.5px;
  color: var(--text-muted);
  transition: color .15s var(--ease);
}
.nav__links a:hover{ color: var(--text); }
.nav__actions{ display: flex; align-items: center; gap: 14px; }
.nav__toggle{
  display: none;
  flex-direction: column;
  gap: 4px;
  background: none;
  border: none;
  padding: 8px;
}
.nav__toggle span{
  width: 20px; height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: transform .2s var(--ease), opacity .2s var(--ease);
}

/* ============ HERO ============ */
.hero{
  position: relative;
  padding: 96px 0 80px;
  overflow: hidden;
}
.hero__bg{
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}
.hero__grid{
  position: absolute;
  inset: -10% -10% auto auto;
  width: 70%;
  height: 140%;
  background-image:
    linear-gradient(var(--border-soft) 1px, transparent 1px),
    linear-gradient(90deg, var(--border-soft) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: radial-gradient(ellipse 60% 60% at 70% 30%, black 0%, transparent 75%);
  opacity: .7;
}
.hero__inner{
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 56px;
  align-items: center;
}
.eyebrow{
  display: inline-flex;
  align-items: center;
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--text-muted);
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 7px 14px;
  border-radius: 100px;
  margin-bottom: 28px;
}
.hero__title{
  font-family: var(--font-display);
  font-size: clamp(34px, 4.4vw, 54px);
  line-height: 1.12;
  font-weight: 700;
  letter-spacing: -0.5px;
  margin-bottom: 22px;
}
.hero__title-accent{ color: var(--pulso); }
.hero__lead{
  font-size: 17px;
  color: var(--text-muted);
  max-width: 480px;
  margin-bottom: 36px;
}
.hero__cta{ display: flex; gap: 14px; flex-wrap: wrap; }

/* ----- chat card (signature element) ----- */
.hero__visual{ position: relative; }
.chatcard{
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: 0 30px 60px -20px rgba(0,0,0,.6);
  overflow: hidden;
  max-width: 380px;
  margin: 0 auto;
}
.chatcard__header{
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 18px;
  border-bottom: 1px solid var(--border-soft);
  background: var(--surface-2);
}
.chatcard__avatar{
  width: 36px; height: 36px;
  border-radius: 50%;
  background: var(--pulso);
  color: #fff;
  font-family: var(--font-display);
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.chatcard__id{ display: flex; flex-direction: column; gap: 2px; }
.chatcard__id strong{ font-size: 14.5px; }
.chatcard__id small{ font-size: 12.5px; color: var(--text-muted); display: flex; align-items: center; }
.chatcard__body{
  padding: 18px;
  min-height: 280px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.bubble{
  max-width: 86%;
  padding: 10px 14px;
  border-radius: 14px;
  font-size: 14px;
  line-height: 1.45;
  opacity: 0;
  transform: translateY(8px);
  animation: bubbleIn .35s var(--ease) forwards;
}
@keyframes bubbleIn{ to{ opacity: 1; transform: translateY(0); } }
.bubble--in{
  align-self: flex-start;
  background: var(--surface-2);
  border: 1px solid var(--border-soft);
  border-bottom-left-radius: 4px;
}
.bubble--out{
  align-self: flex-end;
  background: var(--pulso-soft);
  border: 1px solid rgba(91,110,255,.3);
  color: #DCE2FF;
  border-bottom-right-radius: 4px;
}
.typing{
  align-self: flex-start;
  display: inline-flex;
  gap: 4px;
  padding: 12px 14px;
  background: var(--surface-2);
  border: 1px solid var(--border-soft);
  border-radius: 14px;
  border-bottom-left-radius: 4px;
}
.typing span{
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--text-faint);
  animation: typingDot 1s ease-in-out infinite;
}
.typing span:nth-child(2){ animation-delay: .15s; }
.typing span:nth-child(3){ animation-delay: .3s; }
@keyframes typingDot{ 0%, 60%, 100%{ transform: translateY(0); opacity: .4; } 30%{ transform: translateY(-3px); opacity: 1; } }

.floatchip{
  position: absolute;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-muted);
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 6px 12px;
  border-radius: 100px;
  box-shadow: 0 10px 24px -8px rgba(0,0,0,.5);
}
.floatchip--1{ top: 6%; left: -4%; }
.floatchip--2{ bottom: 14%; right: -6%; }
.floatchip--3{ top: 48%; right: -10%; }

/* ============ TICKER ============ */
.ticker{
  border-top: 1px solid var(--border-soft);
  border-bottom: 1px solid var(--border-soft);
  background: var(--surface);
  overflow: hidden;
  padding: 16px 0;
}
.ticker__track{
  display: flex;
  width: max-content;
  gap: 48px;
  animation: scrollTicker 28s linear infinite;
}
@keyframes scrollTicker{
  from{ transform: translateX(0); }
  to{ transform: translateX(-50%); }
}
.ticker__item{
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--text-faint);
  display: flex;
  align-items: center;
  gap: 10px;
  white-space: nowrap;
}
.ticker__item::before{ content: "◆"; font-size: 8px; color: var(--text-faint); }

/* ============ SECTION GENERIC ============ */
.section{ padding: 104px 0; }
.section--alt{ background: var(--surface); border-top: 1px solid var(--border-soft); border-bottom: 1px solid var(--border-soft); }
.section__eyebrow{
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--pulso);
  margin-bottom: 14px;
}
.section__title{
  font-family: var(--font-display);
  font-size: clamp(28px, 3.2vw, 40px);
  font-weight: 700;
  letter-spacing: -0.3px;
  max-width: 640px;
  margin-bottom: 18px;
}
.section__lead{
  color: var(--text-muted);
  font-size: 16.5px;
  max-width: 560px;
  margin-bottom: 56px;
}

/* ============ SERVICES (network grid) ============ */
.services{
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}
.service-card{
  background: var(--ink);
  padding: 32px 26px;
  transition: background .2s var(--ease);
}
.service-card:hover{ background: var(--surface); }
.service-card__tag{
  font-family: var(--font-mono);
  font-size: 12.5px;
  color: var(--online);
  margin-bottom: 18px;
}
.service-card h3{
  font-family: var(--font-display);
  font-size: 19px;
  font-weight: 600;
  margin-bottom: 12px;
}
.service-card p{ color: var(--text-muted); font-size: 14.5px; }

/* ============ PIPELINE ============ */
.pipeline{
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 0;
  position: relative;
}
.pipeline__stage{
  position: relative;
  padding: 0 22px 0 0;
  border-right: 1px dashed var(--border);
}
.pipeline__stage:last-child{ border-right: none; padding-right: 0; }
.pipeline__stage::after{
  content: "→";
  position: absolute;
  right: -13px;
  top: 2px;
  color: var(--text-faint);
  font-size: 14px;
}
.pipeline__stage:last-child::after{ content: ""; }
.pipeline__index{
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--syntax);
  margin-bottom: 12px;
}
.pipeline__stage h3{
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 600;
  margin-bottom: 10px;
}
.pipeline__stage p{ color: var(--text-muted); font-size: 14px; }

/* ============ BENEFITS ============ */
.benefits{
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 28px;
  margin-bottom: 64px;
}
.benefit__icon{
  width: 42px; height: 42px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 10px;
  background: var(--pulso-soft);
  color: var(--pulso);
  margin-bottom: 18px;
}
.benefit__icon svg{ width: 20px; height: 20px; }
.benefit h3{
  font-family: var(--font-display);
  font-size: 16.5px;
  font-weight: 600;
  margin-bottom: 8px;
}
.benefit p{ color: var(--text-muted); font-size: 14px; }

.stack-strip{
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  padding: 26px 30px;
  display: flex;
  align-items: center;
  gap: 28px;
  flex-wrap: wrap;
}
.stack-strip__label{
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--text-faint);
  flex-shrink: 0;
}
.stack-strip__items{ display: flex; gap: 12px; flex-wrap: wrap; }
.stack-strip__items span{
  font-family: var(--font-mono);
  font-size: 12.5px;
  color: var(--text-muted);
  border: 1px solid var(--border);
  border-radius: 100px;
  padding: 5px 12px;
}

/* ============ CONTACTO ============ */
.section--cta{ padding-bottom: 120px; }
.cta{
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
}
.contact-list{ display: flex; flex-direction: column; gap: 16px; margin-top: 8px; }
.contact-list li{ display: flex; align-items: center; gap: 12px; color: var(--text-muted); font-size: 15px; }
.contact-list svg{ width: 18px; height: 18px; flex-shrink: 0; color: var(--pulso); }
.contact-list a:hover{ color: var(--text); }

.contact-form{
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.contact-form label{
  font-size: 13px;
  color: var(--text-muted);
  margin-top: 14px;
  margin-bottom: 2px;
}
.contact-form input,
.contact-form textarea{
  background: var(--ink);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  color: var(--text);
  resize: vertical;
}
.contact-form input::placeholder,
.contact-form textarea::placeholder{ color: var(--text-faint); }
.contact-form input:focus,
.contact-form textarea:focus{ border-color: var(--pulso); }
.contact-form .btn{ margin-top: 22px; }
.contact-form__hint{ font-size: 12.5px; color: var(--text-faint); margin-top: 10px; text-align: center; }

/* ============ FOOTER ============ */
.footer{
  border-top: 1px solid var(--border-soft);
  padding: 56px 0 36px;
}
.footer__inner{
  display: grid;
  grid-template-columns: 1.2fr 1fr 1fr;
  gap: 24px;
  align-items: start;
}
.footer__tagline{ color: var(--text-muted); font-size: 14px; margin-top: 12px; max-width: 280px; }
.footer__links{ display: flex; flex-direction: column; gap: 10px; }
.footer__links a{ font-size: 14px; color: var(--text-muted); }
.footer__links a:hover{ color: var(--text); }
.footer__copy{ font-size: 13px; color: var(--text-faint); text-align: right; }

/* ============ FLOATING WHATSAPP ============ */
.float-wa{
  position: fixed;
  bottom: 26px; right: 26px;
  width: 56px; height: 56px;
  background: var(--online);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 12px 28px -8px rgba(52,211,153,.55);
  z-index: 60;
  transition: transform .18s var(--ease);
}
.float-wa:hover{ transform: scale(1.07); }
.float-wa svg{ width: 26px; height: 26px; }

/* ============ REVEAL ============ */
.reveal{
  opacity: 0;
  transform: translateY(18px);
  transition: opacity .6s var(--ease), transform .6s var(--ease);
}
.reveal.is-visible{ opacity: 1; transform: translateY(0); }

/* ============ RESPONSIVE ============ */
@media (max-width: 980px){
  .hero__inner{ grid-template-columns: 1fr; }
  .hero__visual{ order: -1; max-width: 420px; margin: 0 auto 24px; }
  .floatchip{ display: none; }
  .services{ grid-template-columns: repeat(2, 1fr); }
  .pipeline{ grid-template-columns: repeat(2, 1fr); row-gap: 36px; }
  .pipeline__stage{ border-right: none; padding-right: 0; }
  .pipeline__stage::after{ content: ""; }
  .benefits{ grid-template-columns: repeat(2, 1fr); }
  .cta{ grid-template-columns: 1fr; }
  .footer__inner{ grid-template-columns: 1fr; gap: 28px; }
  .footer__copy{ text-align: left; }
}

@media (max-width: 720px){
  .nav__links{
    position: absolute;
    top: 72px; left: 0; right: 0;
    background: var(--ink);
    border-bottom: 1px solid var(--border-soft);
    flex-direction: column;
    padding: 18px 24px;
    gap: 18px;
    transform: translateY(-8px);
    opacity: 0;
    pointer-events: none;
    transition: opacity .2s var(--ease), transform .2s var(--ease);
  }
  .nav__links.is-open{
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
  }
  .nav__toggle{ display: flex; }
  .nav__toggle[aria-expanded="true"] span:nth-child(1){ transform: translateY(6px) rotate(45deg); }
  .nav__toggle[aria-expanded="true"] span:nth-child(2){ opacity: 0; }
  .nav__toggle[aria-expanded="true"] span:nth-child(3){ transform: translateY(-6px) rotate(-45deg); }
  .services{ grid-template-columns: 1fr; }
  .pipeline{ grid-template-columns: 1fr; }
  .benefits{ grid-template-columns: 1fr; }
  .section{ padding: 72px 0; }
  .hero{ padding: 56px 0 56px; }
  .stack-strip{ flex-direction: column; align-items: flex-start; }
}
