/* ============================================================
   Nexum Automations — sistema de diseño (Dark SaaS premium)
   Identidad fija: fondo oscuro siempre, sin modo claro —
   es una decisión de marca, no una preferencia de interfaz.
   Todo color/tipografía vive en variables en :root.
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=Space+Grotesk:wght@600;700&display=swap');

:root{
  /* color — valores exactos del manual de marca */
  --bg:#050816;
  --bg-2:#0B1020;
  --bg-3:#111827;
  --purple:#6D28D9;
  --purple-bright:#8B3DFF;
  --orange:#FF6A00;
  --orange-bright:#FF8A1F;
  --white:#F8FAFC;
  --gray:#CBD5E1;

  --border: rgba(139,61,255,0.20);
  --border-strong: rgba(139,61,255,0.5);
  --glass-bg: rgba(11,16,32,0.72);

  --grad-primary: linear-gradient(120deg, var(--orange) 0%, var(--purple-bright) 100%);
  --grad-secondary: linear-gradient(160deg, var(--purple-bright) 0%, var(--purple) 100%);

  --shadow-card: 0 1px 0 rgba(255,255,255,.03) inset, 0 20px 48px rgba(0,0,0,.35);
  --glow-purple: 0 0 0 1px rgba(139,61,255,.25), 0 0 40px rgba(139,61,255,.18);
  --glow-orange: 0 0 0 1px rgba(255,106,0,.35), 0 0 32px rgba(255,106,0,.28);

  --f-display:'Space Grotesk', ui-sans-serif, system-ui, sans-serif;
  --f-body:'Inter', ui-sans-serif, system-ui, sans-serif;

  --container:1180px;
  --r-sm:10px;
  --r-md:20px;
  --r-lg:28px;
  --r-btn:14px;
}

*,*::before,*::after{ box-sizing:border-box; }
html{ scroll-behavior:smooth; overflow-x:hidden; }
body{
  margin:0;
  background:var(--bg);
  color:var(--white);
  font-family:var(--f-body);
  font-size:18px;
  line-height:1.6;
  -webkit-font-smoothing:antialiased;
  overflow-x:hidden;
}
img{ max-width:100%; display:block; }
a{ color:inherit; }
:focus-visible{ outline:2px solid var(--purple-bright); outline-offset:3px; }
::selection{ background:rgba(255,106,0,.35); color:var(--white); }

.container{ max-width:var(--container); margin:0 auto; padding:0 24px; position:relative; }

h1,h2,h3{
  font-family:var(--f-display);
  font-weight:700;
  letter-spacing:-.01em;
  text-wrap:balance;
  margin:0;
  color:var(--white);
}
h1{ font-size:clamp(2.5rem, 1.5rem + 4.4vw, 5rem); line-height:1.05; font-weight:800; }
h2{ font-size:clamp(2rem, 1.4rem + 2.6vw, 3.5rem); line-height:1.1; }
h3{ font-size:clamp(1.6rem, 1.4rem + .8vw, 2.1rem); line-height:1.25; font-weight:600; }
h4{ font-family:var(--f-body); font-weight:700; font-size:1.05rem; margin:0; color:var(--white); }
p{ margin:0; color:var(--gray); }
p.lede{ font-size:1.2rem; line-height:1.65; color:var(--gray); max-width:52ch; }
.prose p + p{ margin-top:14px; }
.prose{ max-width:66ch; }
.small{ font-size:14.5px; }

.eyebrow{
  font-family:var(--f-body);
  font-weight:600;
  font-size:13px;
  letter-spacing:.14em;
  text-transform:uppercase;
  color:var(--purple-bright);
  display:inline-flex;
  align-items:center;
  gap:9px;
}
.eyebrow::before{
  content:''; width:6px; height:6px; border-radius:999px; background:var(--orange); flex:none;
  box-shadow:0 0 10px 2px rgba(255,106,0,.6);
}

.grad-text{
  background:var(--grad-primary);
  -webkit-background-clip:text; background-clip:text; color:transparent;
}

/* ---------- ambient background glow (no repetir circuitos, solo luz difusa) ---------- */
.ambient{ position:relative; isolation:isolate; }
.ambient::before, .ambient::after{
  content:''; position:absolute; z-index:-1; border-radius:50%; filter:blur(90px); pointer-events:none;
}
.ambient::before{
  width:520px; height:520px; top:-180px; right:-120px;
  background:radial-gradient(circle, rgba(139,61,255,.35), transparent 70%);
}
.ambient::after{
  width:420px; height:420px; bottom:-160px; left:-100px;
  background:radial-gradient(circle, rgba(255,106,0,.16), transparent 70%);
}
.grid-lines{
  position:absolute; inset:0; z-index:-1; opacity:.35;
  background-image:
    linear-gradient(rgba(139,61,255,.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(139,61,255,.08) 1px, transparent 1px);
  background-size:64px 64px;
  mask-image:radial-gradient(ellipse 80% 60% at 50% 0%, #000 40%, transparent 100%);
}

/* ---------- header ---------- */
.site-header{
  position:sticky; top:0; z-index:50;
  background:rgba(5,8,22,.78);
  backdrop-filter:blur(14px);
  border-bottom:1px solid var(--border);
}
.site-header .container{
  display:flex; align-items:center; justify-content:space-between;
  padding-top:16px; padding-bottom:16px; gap:16px;
}
.brand{ display:flex; align-items:center; gap:10px; text-decoration:none; }
.brand-word{
  font-family:var(--f-display); font-weight:700; font-size:19px; letter-spacing:-.01em; color:var(--white);
}
.brand-accent{ color:var(--orange); }
.logo-mark{ height:34px; width:auto; display:block; }

/* deja espacio para el header sticky al saltar a un ancla (#top, #como-funciona) */
#top, #como-funciona{ scroll-margin-top:90px; }

.nav{ display:flex; align-items:center; gap:30px; }
.nav-links{ display:flex; gap:26px; list-style:none; margin:0; padding:0; }
.nav-links a{
  text-decoration:none; font-weight:500; font-size:14.5px; color:var(--gray);
  padding:6px 2px; border-bottom:2px solid transparent; transition:color .2s ease, border-color .2s ease;
}
.nav-links a:hover, .nav-links a[aria-current="page"]{ color:var(--white); border-bottom-color:var(--orange); }
.nav-toggle{ display:none; }

/* ---------- buttons ---------- */
.btn{
  display:inline-flex; align-items:center; justify-content:center; gap:9px;
  font-family:var(--f-body); font-weight:600; font-size:15px;
  padding:13px 24px; border-radius:var(--r-btn); border:1px solid transparent;
  text-decoration:none; cursor:pointer; line-height:1;
  transition:transform .18s ease, box-shadow .18s ease, filter .18s ease, border-color .18s ease;
}
.btn:active{ transform:translateY(0) scale(.98); }
/* Texto oscuro sobre naranja: el naranja de marca (#FF6A00) no da suficiente
   contraste con texto blanco (~2.9:1, por debajo de WCAG AA). Con texto
   oscuro el contraste sube a ~6.6:1 sin tocar el naranja de marca. */
.btn-primary{ background:var(--orange); color:var(--bg); font-weight:700; box-shadow:var(--glow-orange); }
.btn-primary:hover{ filter:brightness(1.08); transform:translateY(-2px); }
.btn-secondary{ background:transparent; color:var(--white); border-color:var(--border-strong); }
.btn-secondary:hover{ border-color:var(--purple-bright); box-shadow:var(--glow-purple); transform:translateY(-2px); }
.btn-whatsapp{ background:var(--bg-3); color:var(--white); border-color:var(--border); }
.btn-whatsapp:hover{ border-color:var(--border-strong); transform:translateY(-2px); }
.btn-block{ width:100%; }
.btn svg{ width:17px; height:17px; flex:none; }

/* ---------- hero ---------- */
.hero{ padding:76px 0 56px; }
.hero-grid{ display:grid; grid-template-columns:1.05fr .95fr; gap:56px; align-items:center; }
.hero h1{ margin-top:18px; }
.hero p.lede{ margin-top:20px; }
.hero-cta{ display:flex; gap:14px; margin-top:32px; flex-wrap:wrap; }
.hero-proof{ display:flex; gap:30px; margin-top:44px; flex-wrap:wrap; }
.hero-proof div{ font-size:13px; color:var(--gray); max-width:17ch; }
.hero-proof b{ display:block; font-family:var(--f-display); font-size:1.7rem; color:var(--white); font-weight:700; }

/* ---------- glass panels (whatsapp / dashboard mockups) ---------- */
.glass{
  background:var(--glass-bg); border:1px solid var(--border); border-radius:var(--r-lg);
  backdrop-filter:blur(16px); box-shadow:var(--shadow-card);
}
.phone{ max-width:360px; margin:0 auto; padding:16px; }
.phone-bar{
  display:flex; align-items:center; gap:10px; padding:10px 12px; border-radius:var(--r-sm);
  background:var(--bg-3); font-size:13px; font-weight:600; color:var(--white); margin-bottom:12px;
}
.phone-bar .dot{ width:8px; height:8px; border-radius:999px; background:var(--orange); box-shadow:0 0 8px 2px rgba(255,106,0,.6); }
.phone-chat{ display:flex; flex-direction:column; gap:9px; min-height:260px; }
.bubble{ max-width:82%; padding:10px 13px; border-radius:14px; font-size:13.5px; line-height:1.5; }
.bubble.in{ background:var(--bg-3); border:1px solid var(--border); color:var(--gray); align-self:flex-start; border-bottom-left-radius:4px; }
.bubble.out{ background:var(--grad-secondary); color:var(--white); align-self:flex-end; border-bottom-right-radius:4px; }
.phone-caption{ text-align:center; font-size:11.5px; color:var(--gray); margin-top:12px; opacity:.75; }

/* dashboard mockup */
.dash{ padding:20px; }
.dash-head{ display:flex; justify-content:space-between; align-items:center; margin-bottom:16px; }
.dash-head span{ font-size:12.5px; font-weight:600; color:var(--gray); letter-spacing:.06em; text-transform:uppercase; }
.dash-stats{ display:grid; grid-template-columns:repeat(3,1fr); gap:10px; margin-bottom:14px; }
.dash-stat{ background:var(--bg-3); border:1px solid var(--border); border-radius:var(--r-sm); padding:12px; }
.dash-stat b{ display:block; font-family:var(--f-display); font-size:1.4rem; color:var(--white); }
.dash-stat span{ font-size:11.5px; color:var(--gray); }
.dash-row{
  display:flex; flex-wrap:wrap; justify-content:space-between; align-items:center; gap:8px 10px;
  background:var(--bg-3); border:1px solid var(--border); border-radius:var(--r-sm);
  padding:11px 13px; margin-bottom:8px;
}
.dash-row .who{ font-size:13.5px; font-weight:600; color:var(--white); }
.dash-row .meta{ font-size:12px; color:var(--gray); }
.pill{
  font-size:11px; font-weight:600; padding:4px 10px; border-radius:999px;
}
.pill-pending{ background:rgba(255,106,0,.15); color:var(--orange-bright); border:1px solid rgba(255,106,0,.35); }
.pill-confirmed{ background:rgba(139,61,255,.15); color:var(--purple-bright); border:1px solid var(--border); }

/* ---------- sections ---------- */
section{ padding:88px 0; }
section.tight{ padding:48px 0; }
.section-head{ max-width:60ch; margin-bottom:44px; }
.section-head h2{ margin-top:12px; }
.section-head p.lede{ margin-top:14px; }
.section-alt{ background:var(--bg-2); border-top:1px solid var(--border); border-bottom:1px solid var(--border); }

/* steps */
.steps{ display:grid; grid-template-columns:repeat(4,1fr); gap:18px; }
.step{
  background:var(--bg-2); border:1px solid var(--border); border-radius:var(--r-md);
  padding:24px 20px; box-shadow:var(--shadow-card);
}
.step .num{
  font-family:var(--f-display); font-weight:700; font-size:14px; color:var(--orange);
  border:1px solid rgba(255,106,0,.4); border-radius:999px; width:28px; height:28px;
  display:flex; align-items:center; justify-content:center; margin-bottom:16px;
}
.step h3{ font-size:1.1rem; margin-bottom:8px; }
.step p{ font-size:14px; }

/* card grid */
.grid-4{ display:grid; grid-template-columns:repeat(4,1fr); gap:18px; }
.grid-3{ display:grid; grid-template-columns:repeat(3,1fr); gap:18px; }
.grid-2{ display:grid; grid-template-columns:1fr 1fr; gap:18px; }
.card{
  background:var(--bg-2); border:1px solid var(--border); border-radius:var(--r-md);
  padding:24px; box-shadow:var(--shadow-card); transition:border-color .2s ease, transform .2s ease;
}
.card:hover{ border-color:var(--border-strong); transform:translateY(-3px); }
.card h3{ font-size:1.15rem; margin-bottom:8px; }
.card p{ font-size:14.5px; }
.card .icon{
  width:42px; height:42px; border-radius:12px; background:rgba(139,61,255,.14); color:var(--purple-bright);
  display:flex; align-items:center; justify-content:center; margin-bottom:16px; border:1px solid var(--border);
}
.card .icon svg{ width:20px; height:20px; }
.card.use-case{ opacity:.6; }
.card.use-case.live{ opacity:1; }

/* asymmetric feature row — alterna texto/visual de lado para dar ritmo
   a la composición. .feature-visual siempre va segundo en el HTML (por
   orden de lectura); "order" es lo que lo mueve a la izquierda cuando
   la fila lleva .reverse. */
.feature-row{ display:grid; grid-template-columns:.95fr 1.05fr; gap:56px; align-items:center; }
.feature-row .feature-visual{ order:2; }
.feature-row.reverse .feature-visual{ order:-1; }
.feature-visual{ position:relative; }

/* implementation process */
.process{ display:grid; grid-template-columns:repeat(5,1fr); gap:14px; }
.process-step{ position:relative; padding-top:18px; }
.process-step::before{
  content:''; position:absolute; top:0; left:0; width:100%; height:2px;
  background:var(--grad-primary); opacity:.5;
}
.process-step .n{ font-family:var(--f-display); font-weight:700; color:var(--orange); font-size:13px; }
.process-step h4{ margin-top:10px; font-size:15px; }
.process-step p{ font-size:13px; margin-top:6px; }

/* accordion */
details.acc{
  background:var(--bg-2); border:1px solid var(--border); border-radius:var(--r-sm);
  margin-top:10px; overflow:hidden;
}
details.acc summary{
  list-style:none; cursor:pointer; padding:16px 18px;
  display:flex; align-items:center; justify-content:space-between; gap:10px;
  font-weight:600; font-size:15.5px; color:var(--white);
}
details.acc summary::-webkit-details-marker{ display:none; }
details.acc summary::after{ content:'+'; font-family:var(--f-display); color:var(--orange); font-size:19px; flex:none; }
details.acc[open] summary::after{ content:'\2212'; }
details.acc[open] summary{ border-bottom:1px solid var(--border); }
details.acc .ans{ padding:16px 18px; font-size:14.5px; color:var(--gray); }

/* principle cards (nosotros) */
.principle{ border-left:2px solid var(--purple-bright); padding-left:18px; }
.principle h3{ font-size:1.1rem; margin-bottom:8px; }
.principle p{ font-size:14.5px; }

/* CTA band */
.cta-band{
  text-align:center; background:var(--bg-2); border:1px solid var(--border);
  border-radius:var(--r-lg); padding:56px 28px; position:relative; overflow:hidden;
}
.cta-band h2{ max-width:32ch; margin:12px auto 0; }
.cta-band .hero-cta{ justify-content:center; margin-top:28px; }

/* form */
.form-grid{ display:grid; gap:18px; }
.field label{ display:block; font-weight:600; font-size:14px; margin-bottom:7px; color:var(--white); }
.field input, .field textarea{
  width:100%; font-family:var(--f-body); font-size:15px; color:var(--white);
  background:var(--bg-3); border:1px solid var(--border); border-radius:var(--r-sm);
  padding:12px 14px;
}
.field input::placeholder, .field textarea::placeholder{ color:rgba(203,213,225,.45); }
.field input:focus, .field textarea:focus{ border-color:var(--purple-bright); box-shadow:var(--glow-purple); }
.field textarea{ resize:vertical; min-height:120px; }
.field.error input, .field.error textarea{ border-color:var(--orange); }
.field .err-msg{ font-size:12px; color:var(--orange-bright); margin-top:5px; display:none; }
.field.error .err-msg{ display:block; }
.hp{ position:absolute; left:-9999px; width:1px; height:1px; overflow:hidden; }
.form-note{ font-size:12.5px; color:var(--gray); }
.form-note a{ color:var(--purple-bright); font-weight:600; }
.form-success{
  display:none; background:rgba(139,61,255,.12); color:var(--purple-bright); border:1px solid var(--border);
  border-radius:var(--r-sm); padding:14px 16px; font-weight:600; font-size:14px; margin-bottom:16px;
}

/* contact split */
.contact-grid{ display:grid; grid-template-columns:.95fr 1.05fr; gap:36px; align-items:start; }
.contact-side .card + .card{ margin-top:16px; }

/* footer */
.site-footer{ border-top:1px solid var(--border); padding:52px 0 30px; background:var(--bg-2); }
.footer-grid{ display:grid; grid-template-columns:1.3fr 1fr 1fr; gap:30px; }
.footer-grid h4{ font-family:var(--f-body); font-size:12px; letter-spacing:.1em; text-transform:uppercase; color:var(--gray); margin-bottom:14px; font-weight:600;}
.footer-grid ul{ list-style:none; margin:0; padding:0; display:grid; gap:9px; }
.footer-grid a{ text-decoration:none; color:var(--gray); font-size:14.5px; transition:color .2s ease; }
.footer-grid a:hover{ color:var(--orange-bright); }
.footer-bottom{
  margin-top:40px; padding-top:22px; border-top:1px solid var(--border);
  display:flex; justify-content:space-between; align-items:center; flex-wrap:wrap; gap:10px;
  font-size:12.5px; color:var(--gray);
}

/* utility */
.stack{ display:grid; gap:9px; }
.tag{
  display:inline-flex; align-items:center; gap:6px; font-family:var(--f-body); font-size:12px;
  font-weight:600; padding:5px 11px; border-radius:999px; background:rgba(139,61,255,.14); color:var(--purple-bright);
  border:1px solid var(--border);
}
.tag.orange{ background:rgba(255,106,0,.14); color:var(--orange-bright); border-color:rgba(255,106,0,.35); }

/* scroll reveal — ver main.js. Por defecto SIEMPRE visible (sin JS o con
   prefers-reduced-motion, no se oculta nada). */
.reveal{ transition:opacity .5s ease, transform .5s ease; }
@media (prefers-reduced-motion: reduce){
  .reveal{ transition:none !important; }
}

/* responsive — tres tramos: escritorio (>980px), tablet (721–980px) y
   móvil (≤720px, con un ajuste fino extra en ≤560px para celulares chicos). */

/* nav hamburger: válido desde tablet hacia abajo */
@media (max-width: 980px){
  .nav{ position:relative; }
  .nav-links{
    position:absolute; top:calc(100% + 14px); right:0; left:auto;
    background:var(--bg-2); border:1px solid var(--border); border-radius:var(--r-md);
    box-shadow:var(--shadow-card); flex-direction:column; padding:16px; min-width:210px;
    display:none;
  }
  .nav.open .nav-links{ display:flex; }
  .nav-toggle{
    display:flex; align-items:center; justify-content:center; width:42px; height:42px;
    border-radius:10px; border:1px solid var(--border); background:var(--bg-2); color:var(--white); cursor:pointer;
  }
  .nav-toggle svg{ width:19px; height:19px; }

  .hero-grid, .contact-grid, .footer-grid, .feature-row, .feature-row.reverse, .grid-2{
    grid-template-columns:1fr;
  }
  .feature-row .feature-visual, .feature-row.reverse .feature-visual{ order:0; }
  .feature-visual{ max-width:420px; margin:0 auto; width:100%; }
  h1{ text-align:left; }
}

/* tablet: columnas intermedias en vez de saltar directo a una sola */
@media (max-width: 980px) and (min-width: 721px){
  .grid-4, .grid-3{ grid-template-columns:repeat(2,1fr); }
  .steps, .process{ grid-template-columns:repeat(2,1fr); }
}

/* móvil: todo apilado en una columna */
@media (max-width: 720px){
  .container{ padding:0 18px; }
  .grid-4, .grid-3, .steps, .process{ grid-template-columns:1fr; }
  .process-step::before{ display:none; }
  .hero-cta, .cta-band .hero-cta{ flex-direction:column; align-items:stretch; }
  .hero-cta .btn, .cta-band .hero-cta .btn{ width:100%; }
  .hero-proof{ gap:20px; }
  .footer-bottom{ flex-direction:column; align-items:flex-start; gap:6px; }
}

@media (max-width:560px){
  .hero{ padding:48px 0 32px; }
  section{ padding:52px 0; }
  section.tight{ padding:36px 0; }
  .cta-band{ padding:32px 18px; }
  .phone{ padding:12px; }
  .dash{ padding:16px; }
  .dash-stats{ grid-template-columns:1fr 1fr; }
  .dash-stats .dash-stat:last-child{ grid-column:1 / -1; }
}

.no-scroll-x{ overflow-x:auto; }
