/* ============================================================
   LatamNova Group System — Landing premium
   Paleta: azul-noche profundo + cian eléctrico + violeta
   Tipos:  Space Grotesk (display) / Inter (cuerpo)
   ============================================================ */

:root {
  --ink:        #05070f;   /* fondo base */
  --ink-2:      #0a0e1e;   /* superficies */
  --ink-3:      #10162e;   /* cards elevadas */
  --cyan:       #35e6d4;   /* acento principal */
  --cyan-dim:   rgba(53,230,212,.14);
  --violet:     #7b6cff;   /* acento secundario */
  --text:       #eaf0ff;
  --muted:      #93a0c2;
  --line:       rgba(120,140,200,.13);
  --line-2:     rgba(120,140,200,.24);

  --font-display: "Space Grotesk", system-ui, sans-serif;
  --font-body: "Inter", system-ui, sans-serif;

  --wrap: 1160px;
  --r: 18px;
  --ease: cubic-bezier(.16, 1, .3, 1);
}

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

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  background: var(--ink);
  color: var(--text);
  font-family: var(--font-body);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

.wrap { width: min(var(--wrap), 90vw); margin-inline: auto; }
a { color: inherit; text-decoration: none; }
img, svg { display: block; }

::selection { background: var(--cyan); color: #04121a; }

/* ---------- Grano / textura ---------- */
.grain {
  position: fixed; inset: 0; z-index: 2; pointer-events: none;
  opacity: .04; mix-blend-mode: screen;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ---------- Barra de progreso scroll ---------- */
.scrollbar {
  position: fixed; top: 0; left: 0; height: 3px; width: 0%;
  z-index: 60; transform-origin: left;
  background: linear-gradient(90deg, var(--cyan), var(--violet));
  box-shadow: 0 0 12px -2px var(--cyan);
}

/* ---------- Preloader ---------- */
.preloader {
  position: fixed; inset: 0; z-index: 100;
  display: grid; place-items: center;
  background: var(--ink);
  transition: opacity .6s var(--ease), visibility .6s;
}
.preloader.is-done { opacity: 0; visibility: hidden; }
.preloader__path {
  stroke-dasharray: 260; stroke-dashoffset: 260;
  animation: draw 1.3s var(--ease) forwards;
}
.preloader__mark { animation: pulseGlow 1.6s ease-in-out infinite; filter: drop-shadow(0 0 14px rgba(53,230,212,.5)); }
@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes pulseGlow { 50% { transform: scale(1.06); } }

/* ---------- Cursor custom ---------- */
.cursor { position: fixed; top: 0; left: 0; z-index: 90; pointer-events: none; mix-blend-mode: difference; display: none; }
.cursor__dot {
  position: absolute; width: 6px; height: 6px; border-radius: 50%;
  background: #fff; transform: translate(-50%, -50%);
}
.cursor__ring {
  position: absolute; width: 34px; height: 34px; border-radius: 50%;
  border: 1px solid rgba(255,255,255,.6); transform: translate(-50%, -50%);
  transition: width .25s var(--ease), height .25s var(--ease), background .25s;
}
.cursor.is-hover .cursor__ring { width: 54px; height: 54px; background: rgba(255,255,255,.12); }
@media (hover: hover) and (pointer: fine) {
  .cursor { display: block; }
  body { cursor: none; }
  a, button, [data-cursor], summary { cursor: none; }
}

/* ---------- Botones ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .55rem;
  font-family: var(--font-display); font-weight: 600; font-size: .95rem;
  padding: .75rem 1.4rem; border-radius: 100px;
  background: var(--cyan); color: #04121a;
  border: 1px solid transparent; cursor: pointer;
  position: relative; overflow: hidden;
  transition: transform .3s var(--ease), box-shadow .3s var(--ease);
  will-change: transform;
}
.btn__arrow { transition: transform .3s var(--ease); }
.btn:hover { transform: translateY(-2px); box-shadow: 0 16px 38px -12px rgba(53,230,212,.6); }
.btn:hover .btn__arrow { transform: translateX(4px); }
.btn--sm { padding: .58rem 1.15rem; font-size: .88rem; }
.btn--lg { padding: 1rem 1.8rem; font-size: 1rem; }
.btn--full { width: 100%; }
.btn--ghost { background: transparent; color: var(--text); border-color: var(--line-2); }
.btn--ghost:hover { border-color: var(--cyan); box-shadow: none; background: var(--cyan-dim); }

/* ---------- Brand ---------- */
.brand { display: inline-flex; align-items: center; gap: .6rem; font-family: var(--font-display); font-weight: 700; font-size: 1.15rem; letter-spacing: -.02em; }
.brand__mark { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 9px; background: var(--ink-3); border: 1px solid var(--line-2); box-shadow: 0 0 22px -6px var(--cyan); }
.brand__name { display: flex; flex-direction: column; line-height: 1; }
.brand__sub { color: var(--muted); font-weight: 500; font-size: .62em; letter-spacing: .04em; margin-top: 2px; }

/* ---------- NAV ---------- */
.nav {
  position: fixed; inset: 0 0 auto 0; z-index: 55; padding: 1.1rem 0;
  transition: background .4s var(--ease), padding .4s var(--ease), border-color .4s;
  border-bottom: 1px solid transparent;
}
.nav.is-scrolled {
  background: rgba(5,7,15,.72); backdrop-filter: blur(16px);
  border-bottom-color: var(--line); padding: .65rem 0;
}
.nav__inner { width: min(var(--wrap), 90vw); margin-inline: auto; display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.nav__links { display: flex; gap: 1.8rem; }
.nav__links a { color: var(--muted); font-size: .92rem; position: relative; transition: color .25s; }
.nav__links a::after { content: ""; position: absolute; left: 0; bottom: -4px; width: 0; height: 1.5px; background: var(--cyan); transition: width .3s var(--ease); }
.nav__links a:hover { color: var(--text); }
.nav__links a:hover::after { width: 100%; }
.nav__toggle { display: none; flex-direction: column; gap: 5px; background: none; border: 0; padding: 8px; cursor: pointer; }
.nav__toggle span { width: 24px; height: 2px; background: var(--text); transition: transform .3s var(--ease), opacity .3s; }
.nav__toggle.is-open span:nth-child(1) { transform: translateY(3.5px) rotate(45deg); }
.nav__toggle.is-open span:nth-child(2) { transform: translateY(-3.5px) rotate(-45deg); }

/* ---------- Menú móvil ---------- */
.mobile-menu {
  position: fixed; inset: 0; z-index: 54;
  background: rgba(5,7,15,.97); backdrop-filter: blur(10px);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1.6rem;
  opacity: 0; visibility: hidden; transition: opacity .4s var(--ease), visibility .4s;
}
.mobile-menu.is-open { opacity: 1; visibility: visible; }
.mobile-menu a { font-family: var(--font-display); font-size: 1.5rem; color: var(--text); }

/* ---------- HERO ---------- */
.hero { position: relative; min-height: 100svh; display: grid; align-items: center; padding: 9rem 0 5rem; overflow: hidden; }
.hero__canvas { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 0; }
.hero__orb { position: absolute; z-index: 0; border-radius: 50%; filter: blur(60px); pointer-events: none; }
.hero__orb--1 { width: 46vw; height: 46vw; max-width: 620px; max-height: 620px; top: -14%; right: -10%; background: radial-gradient(circle, rgba(123,108,255,.32), transparent 65%); animation: float1 14s ease-in-out infinite; }
.hero__orb--2 { width: 34vw; height: 34vw; max-width: 460px; max-height: 460px; bottom: -12%; left: -8%; background: radial-gradient(circle, rgba(53,230,212,.2), transparent 65%); animation: float2 18s ease-in-out infinite; }
@keyframes float1 { 50% { transform: translate(-30px, 30px); } }
@keyframes float2 { 50% { transform: translate(30px, -20px); } }
.hero__content { position: relative; z-index: 1; width: min(var(--wrap), 90vw); margin-inline: auto; }

.badge {
  display: inline-flex; align-items: center; gap: .6rem;
  font-family: var(--font-display); text-transform: uppercase; letter-spacing: .18em;
  font-size: .74rem; color: var(--cyan);
  padding: .5rem 1rem; border: 1px solid var(--line-2); border-radius: 100px;
  background: var(--cyan-dim); margin-bottom: 1.8rem;
}
.badge__pulse { width: 8px; height: 8px; border-radius: 50%; background: var(--cyan); box-shadow: 0 0 0 0 rgba(53,230,212,.6); animation: pulse 2s infinite; }
@keyframes pulse { 70% { box-shadow: 0 0 0 8px rgba(53,230,212,0); } 100% { box-shadow: 0 0 0 0 rgba(53,230,212,0); } }

.hero__title { font-family: var(--font-display); font-weight: 700; font-size: clamp(2.4rem, 6.4vw, 5rem); line-height: 1.03; letter-spacing: -.035em; max-width: 15ch; }
.hero__title .line { display: block; overflow: hidden; }
.reveal-text { display: inline-block; transform: translateY(110%); transition: transform .9s var(--ease); }
.is-revealed .reveal-text { transform: translateY(0); }
.grad { background: linear-gradient(100deg, var(--cyan), var(--violet)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero__lead { color: var(--muted); font-size: clamp(1rem, 1.5vw, 1.2rem); max-width: 54ch; margin: 1.8rem 0 2.4rem; }
.hero__cta { display: flex; flex-wrap: wrap; gap: .9rem; }
.hero__stats { display: flex; flex-wrap: wrap; gap: 2.8rem; margin-top: 4rem; }
.stat { display: flex; flex-direction: column; }
.stat__val { display: inline-flex; align-items: baseline; font-family: var(--font-display); font-weight: 700; }
.stat__num { font-size: clamp(1.9rem, 3.6vw, 2.8rem); line-height: 1; }
.stat__suf { color: var(--cyan); font-size: clamp(1.1rem, 2vw, 1.5rem); }
.stat p { color: var(--muted); font-size: .85rem; margin-top: .5rem; }

.hero__scroll { position: absolute; bottom: 2rem; left: 50%; transform: translateX(-50%); z-index: 1; display: flex; flex-direction: column; align-items: center; gap: .6rem; font-family: var(--font-display); font-size: .7rem; text-transform: uppercase; letter-spacing: .2em; color: var(--muted); }
.hero__scroll-line { width: 1px; height: 40px; background: linear-gradient(var(--cyan), transparent); position: relative; overflow: hidden; }
.hero__scroll-line::after { content: ""; position: absolute; top: 0; left: 0; width: 100%; height: 40%; background: var(--cyan); animation: scrollDown 2s ease-in-out infinite; }
@keyframes scrollDown { 0% { transform: translateY(-100%); } 100% { transform: translateY(300%); } }

/* ---------- Ticker ---------- */
.ticker { overflow: hidden; border-block: 1px solid var(--line); padding: 1.3rem 0; background: var(--ink-2); }
.ticker__track { display: flex; align-items: center; gap: 2.4rem; width: max-content; animation: scrollX 28s linear infinite; }
.ticker__track span { font-family: var(--font-display); font-weight: 600; font-size: 1.3rem; color: var(--muted); white-space: nowrap; }
.ticker__dot { color: var(--cyan) !important; font-size: .9rem !important; }
@keyframes scrollX { to { transform: translateX(-50%); } }

/* ---------- Secciones ---------- */
.about, .services, .process, .cases, .stack, .faq, .contact { padding: clamp(5rem, 9vw, 9rem) 0; }
.section__eyebrow { font-family: var(--font-display); text-transform: uppercase; letter-spacing: .2em; font-size: .76rem; color: var(--cyan); margin-bottom: 1rem; }
.section__title { font-family: var(--font-display); font-weight: 700; font-size: clamp(1.8rem, 3.8vw, 2.9rem); line-height: 1.1; letter-spacing: -.02em; max-width: 20ch; }
.section__head { margin-bottom: 3.4rem; }
.section__head--center { text-align: center; margin-inline: auto; }
.section__head--center .section__title { margin-inline: auto; }

/* ---------- ABOUT ---------- */
.about__grid { display: grid; grid-template-columns: 1fr 1.15fr; gap: 3.5rem; align-items: start; }
.about__body p { color: var(--muted); font-size: 1.08rem; }
.about__body p + p { margin-top: 1.1rem; }
.about__points { list-style: none; margin-top: 1.8rem; display: grid; gap: .7rem; }
.about__points li { display: flex; align-items: center; gap: .7rem; color: var(--text); font-size: .98rem; }
.about__points span { color: var(--cyan); font-size: .7rem; }

/* ---------- SERVICIOS ---------- */
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.3rem; }
.card {
  position: relative; background: var(--ink-2); border: 1px solid var(--line);
  border-radius: var(--r); padding: 2rem 1.8rem 1.9rem; overflow: hidden;
  transition: transform .4s var(--ease), border-color .4s, background .4s;
  transform-style: preserve-3d;
}
.card::before { content: ""; position: absolute; inset: 0; background: radial-gradient(420px circle at var(--mx,50%) var(--my,0%), rgba(53,230,212,.12), transparent 42%); opacity: 0; transition: opacity .35s; }
.card:hover { border-color: rgba(53,230,212,.4); background: var(--ink-3); }
.card:hover::before { opacity: 1; }
.card__idx { font-family: var(--font-display); font-weight: 700; color: var(--violet); font-size: .9rem; letter-spacing: .06em; }
.card__icon { position: absolute; top: 1.7rem; right: 1.8rem; font-family: var(--font-display); font-size: 1.4rem; color: var(--cyan); opacity: .55; transition: transform .4s var(--ease); }
.card:hover .card__icon { transform: translateY(-4px) scale(1.12); opacity: 1; }
.card h3 { font-family: var(--font-display); font-weight: 600; font-size: 1.3rem; margin: 1rem 0 .6rem; letter-spacing: -.01em; }
.card p { color: var(--muted); font-size: .98rem; }

/* ---------- PROCESO ---------- */
.steps { list-style: none; display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.3rem; }
.step { padding: 1.9rem 1.5rem; border-top: 2px solid var(--line); position: relative; transition: border-color .4s; }
.step:hover { border-top-color: var(--cyan); }
.step__num { font-family: var(--font-display); font-weight: 700; font-size: 2.4rem; color: transparent; -webkit-text-stroke: 1.5px var(--cyan); display: block; margin-bottom: .8rem; }
.step h3 { font-family: var(--font-display); font-weight: 600; font-size: 1.22rem; margin-bottom: .5rem; }
.step p { color: var(--muted); font-size: .95rem; }

/* ---------- CASOS ---------- */
.cases__grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.3rem; }
.quote { background: var(--ink-2); border: 1px solid var(--line); border-radius: var(--r); padding: 2.2rem 1.9rem; transition: transform .4s var(--ease), border-color .4s; }
.quote:hover { transform: translateY(-6px); border-color: var(--line-2); }
.quote__metric { font-family: var(--font-display); font-weight: 700; font-size: 2.6rem; color: var(--cyan); line-height: 1; display: flex; align-items: baseline; gap: .1rem; margin-bottom: 1.2rem; }
.quote__metric-sub { font-size: .8rem; color: var(--muted); font-weight: 500; margin-left: .5rem; align-self: center; }
.quote p { font-size: 1.04rem; margin-bottom: 1.2rem; }
.quote footer { color: var(--violet); font-size: .78rem; font-family: var(--font-display); letter-spacing: .06em; text-transform: uppercase; }

/* ---------- STACK ---------- */
.stack__grid { display: flex; flex-wrap: wrap; justify-content: center; gap: .9rem; max-width: 820px; margin-inline: auto; }
.stack__grid span {
  font-family: var(--font-display); font-weight: 500; font-size: 1.02rem;
  color: var(--muted); padding: .6rem 1.3rem; border: 1px solid var(--line);
  border-radius: 100px; transition: color .3s, border-color .3s, background .3s, transform .3s var(--ease);
}
.stack__grid span:hover { color: var(--cyan); border-color: rgba(53,230,212,.4); background: var(--cyan-dim); transform: translateY(-3px); }

/* ---------- FAQ ---------- */
.faq__inner { display: grid; grid-template-columns: .85fr 1.15fr; gap: 3.5rem; align-items: start; }
.faq__list { display: grid; gap: .8rem; }
.faq__item { border: 1px solid var(--line); border-radius: 14px; background: var(--ink-2); overflow: hidden; transition: border-color .3s; }
.faq__item[open] { border-color: rgba(53,230,212,.35); }
.faq__item summary { list-style: none; cursor: pointer; padding: 1.2rem 1.4rem; font-family: var(--font-display); font-weight: 500; font-size: 1.05rem; display: flex; justify-content: space-between; align-items: center; gap: 1rem; }
.faq__item summary::-webkit-details-marker { display: none; }
.faq__ico { color: var(--cyan); font-size: 1.4rem; transition: transform .3s var(--ease); flex-shrink: 0; }
.faq__item[open] .faq__ico { transform: rotate(45deg); }
.faq__item p { padding: 0 1.4rem 1.3rem; color: var(--muted); font-size: .98rem; }

/* ---------- CONTACTO ---------- */
.contact__inner { display: grid; grid-template-columns: 1fr 1fr; gap: 3.5rem; align-items: start; }
.contact__lead { color: var(--muted); margin-top: 1.2rem; max-width: 40ch; }
.contact__meta { list-style: none; margin-top: 2rem; display: grid; gap: 1rem; }
.contact__meta li { display: flex; flex-direction: column; gap: .2rem; }
.contact__meta-k { font-family: var(--font-display); text-transform: uppercase; letter-spacing: .12em; font-size: .7rem; color: var(--muted); }
.contact__meta a:hover { color: var(--cyan); }
.form { background: var(--ink-2); border: 1px solid var(--line); border-radius: var(--r); padding: 2.2rem; }
.field { margin-bottom: 1.15rem; }
.field label { display: block; font-size: .88rem; margin-bottom: .45rem; }
.field .opt { color: var(--muted); font-weight: 400; }
.field input, .field textarea {
  width: 100%; background: var(--ink); color: var(--text);
  border: 1px solid var(--line); border-radius: 11px; padding: .85rem .95rem;
  font-family: var(--font-body); font-size: .95rem; transition: border-color .25s, box-shadow .25s; resize: vertical;
}
.field input:focus, .field textarea:focus { outline: none; border-color: var(--cyan); box-shadow: 0 0 0 3px var(--cyan-dim); }
.form__status { margin-top: 1rem; font-size: .9rem; min-height: 1.2em; }
.form__status.ok { color: var(--cyan); }
.form__status.err { color: #ff8a8a; }

/* ---------- FOOTER ---------- */
.footer { border-top: 1px solid var(--line); padding: 4rem 0 2rem; background: var(--ink-2); }
.footer__grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr; gap: 2.5rem; padding-bottom: 3rem; border-bottom: 1px solid var(--line); }
.footer__tag { color: var(--muted); margin-top: 1rem; max-width: 30ch; }
.footer__col { display: flex; flex-direction: column; gap: .7rem; }
.footer__col-title { font-family: var(--font-display); text-transform: uppercase; letter-spacing: .12em; font-size: .72rem; color: var(--muted); margin-bottom: .3rem; }
.footer__col a { color: var(--text); font-size: .95rem; transition: color .25s; }
.footer__col a:hover { color: var(--cyan); }
.footer__bottom { display: flex; justify-content: space-between; flex-wrap: wrap; gap: .6rem; padding-top: 1.6rem; }
.footer__bottom p { color: var(--muted); font-size: .82rem; }

/* ---------- Reveal ---------- */
.reveal { opacity: 0; transform: translateY(28px); transition: opacity .8s var(--ease), transform .8s var(--ease); }
.reveal.is-visible { opacity: 1; transform: none; }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .nav__links, .nav .btn--sm { display: none; }
  .nav__toggle { display: flex; }
  .about__grid, .faq__inner { grid-template-columns: 1fr; gap: 1.8rem; }
  .cards { grid-template-columns: repeat(2, 1fr); }
  .steps { grid-template-columns: repeat(2, 1fr); }
  .cases__grid { grid-template-columns: 1fr; }
  .contact__inner { grid-template-columns: 1fr; gap: 2.2rem; }
  .footer__grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 560px) {
  .cards, .steps { grid-template-columns: 1fr; }
  .hero__stats { gap: 2rem; }
  .footer__grid { grid-template-columns: 1fr; }
  .hero__scroll { display: none; }
}

/* ---------- Accesibilidad ---------- */
:focus-visible { outline: 2px solid var(--cyan); outline-offset: 3px; border-radius: 4px; }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
  .reveal, .reveal-text { opacity: 1 !important; transform: none !important; }
  .cursor { display: none !important; }
  body { cursor: auto !important; }
}
