/* ============================================================
   IONEX — hoja de estilos única. Paleta navy + blanco (sin
   acento de color, jerarquía por opacidad). Inspirado en la
   estructura de krea.uy (nav, hero, tiles, contacto, footer),
   con contenido y marca propios de Ionex.
   ============================================================ */

:root {
  --ink:        #0b1220;   /* navy de marca — canvas principal */
  --ink-alt:    #0e1729;   /* navy alternativo, para tiles pares */
  --card:       #17223b;   /* navy claro, tarjetas */
  --card-2:     #1c2947;   /* navy claro, hover/segundo nivel */
  --on-dark:    #ffffff;
  --muted:      rgba(255,255,255,.68);
  --faint:      rgba(255,255,255,.46);
  --hairline:   rgba(255,255,255,.12);
  --ff-display: 'Outfit', system-ui, -apple-system, sans-serif;
  --ff-text:    'Inter', system-ui, -apple-system, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--ff-text);
  background: var(--ink);
  color: var(--on-dark);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
a { text-decoration: none; color: inherit; }
ul { list-style: none; }

/* ─── PRELOADER ─── */
.preloader {
  position: fixed; inset: 0; z-index: 9999;
  background: var(--ink);
  display: grid; place-items: center;
  transition: opacity .5s ease, visibility .5s ease;
}
.preloader.hide { opacity: 0; visibility: hidden; }
.preloader-text {
  font-family: var(--ff-display); font-weight: 800; letter-spacing: .08em;
  font-size: clamp(2rem, 6vw, 3rem); color: #fff;
}
.preloader-cursor { display: inline-block; width: 3px; height: .9em; background: #fff; margin-left: 4px; vertical-align: -0.1em; animation: blink 0.9s step-end infinite; }
.preloader-cursor.fade { opacity: 0; transition: opacity .3s ease; }
@keyframes blink { 50% { opacity: 0; } }

/* ─── NAV ─── */
nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  height: 60px; display: flex; align-items: center; justify-content: space-between;
  padding: 0 6vw;
  background: transparent; border-bottom: 1px solid transparent;
  transition: background .3s ease, border-color .3s ease, backdrop-filter .3s ease;
}
nav.scrolled {
  background: rgba(11,18,32,.85); backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--hairline);
}
.nav-logo {
  font-family: var(--ff-display); font-weight: 800; font-size: 1.15rem; letter-spacing: .06em;
  opacity: 0; transform: translateY(-4px);
  transition: opacity .3s ease, transform .3s ease;
}
nav.scrolled .nav-logo { opacity: 1; transform: none; }
/* Centrado real: independiente del ancho del logo/CTA a los costados */
.nav-links { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); display: flex; gap: 2rem; }
.nav-links a { font-size: .85rem; font-weight: 700; color: #fff; padding-bottom: 3px; border-bottom: 2px solid transparent; transition: border-color .2s ease; }
.nav-links a:hover { border-color: #fff; }
.nav-cta {
  font-size: .82rem; font-weight: 600; color: var(--ink);
  background: #fff; border-radius: 999px; padding: .5rem 1.1rem;
  margin-left: auto; margin-right: .9rem;
  transition: transform .25s cubic-bezier(.16,1,.3,1);
}
.nav-cta:hover { transform: translateY(-2px) scale(1.03); }
.hamburger { display: none; flex-direction: column; gap: 5px; background: none; border: none; cursor: pointer; padding: 6px; }
.hamburger span { display: block; width: 20px; height: 2px; background: #fff; border-radius: 2px; transition: transform .25s ease, opacity .25s ease; }
.hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; }
.hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
.mobile-menu {
  position: fixed; top: 60px; left: 0; right: 0; z-index: 99;
  background: var(--ink); border-bottom: 1px solid var(--hairline);
  display: flex; flex-direction: column; gap: 1rem; padding: 1.5rem 6vw;
  opacity: 0; visibility: hidden; transform: translateY(-8px);
  transition: opacity .25s ease, transform .25s ease, visibility .25s ease;
}
.mobile-menu.open { opacity: 1; visibility: visible; transform: none; }
.mobile-menu a { font-size: 1rem; padding: .5rem 0; border-bottom: 1px solid var(--hairline); }

/* ─── HERO ─── */
.hero {
  min-height: 100svh; display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center; padding: 120px 6vw 60px; position: relative; overflow: hidden;
}
.hero::before {
  content: ""; position: absolute; inset: -20% -10% auto -10%; height: 70%;
  background: radial-gradient(ellipse 60% 50% at 50% 0%, rgba(255,255,255,.08), transparent 70%);
  pointer-events: none;
}
.hero-logo {
  font-family: var(--ff-display); font-weight: 800; letter-spacing: -.01em;
  font-size: clamp(3rem, 12vw, 7rem); line-height: 1; margin-bottom: 1.6rem; position: relative;
}
.hero-tagline {
  font-family: var(--ff-display); font-weight: 700; font-size: clamp(1.3rem, 3.2vw, 2.1rem);
  line-height: 1.3; color: #fff; max-width: 760px; margin-bottom: 2.6rem; position: relative;
}
.hero-ctas { display: flex; gap: 1rem; flex-wrap: wrap; justify-content: center; position: relative; }

.btn-primary {
  font-weight: 600; font-size: .95rem; color: var(--ink); background: #fff;
  border-radius: 999px; padding: .8rem 1.6rem; display: inline-block;
  transition: transform .25s cubic-bezier(.16,1,.3,1), box-shadow .25s ease;
  box-shadow: 0 6px 20px rgba(255,255,255,.12);
}
.btn-primary:hover { transform: translateY(-2px) scale(1.02); box-shadow: 0 10px 28px rgba(255,255,255,.2); }
.btn-ghost {
  font-weight: 600; font-size: .95rem; color: #fff; background: transparent;
  border: 1px solid rgba(255,255,255,.35); border-radius: 999px; padding: .8rem 1.6rem; display: inline-block;
  transition: all .25s cubic-bezier(.16,1,.3,1);
}
.btn-ghost:hover { background: #fff; color: var(--ink); transform: translateY(-2px) scale(1.02); }

/* ─── TICKER ─── */
.ticker-wrap { border-top: 1px solid var(--hairline); border-bottom: 1px solid var(--hairline); overflow: hidden; padding: 1rem 0; background: var(--ink-alt); }
.ticker-track { display: flex; width: max-content; gap: .6rem; animation: ticker 32s linear infinite; }
.ticker-item { font-size: .85rem; color: var(--faint); white-space: nowrap; }
.ticker-dot { color: var(--faint); margin: 0 .2rem; }
@keyframes ticker { from { transform: translateX(0); } to { transform: translateX(-50%); } }

/* ─── TILES genéricos ─── */
.tile { padding: 6.5rem 6vw; border-top: 1px solid var(--hairline); }
.tile-alt { background: var(--ink-alt); }

/* Sección clara: invierte los tokens de color, todo lo que ya usa
   var(--card)/var(--muted)/var(--faint)/var(--hairline) se adapta solo. */
.tile-light {
  background: #fff; color: var(--ink);
  --card: #f2f4f8; --card-2: #e8ebf2;
  --muted: rgba(11,18,32,.68); --faint: rgba(11,18,32,.5);
  --hairline: rgba(11,18,32,.12);
}
.tile-light .why-card-icon svg,
.tile-light .contact-card-icon svg,
.tile-light .trust-row-icon svg { stroke: var(--ink); }
.tile-light .trust-row-icon { background: var(--card); }
.tile-light .btn-primary { background: var(--ink); color: #fff; box-shadow: 0 6px 20px rgba(11,18,32,.18); }
.tile-light .btn-primary:hover { box-shadow: 0 10px 28px rgba(11,18,32,.28); }
.tile-light .btn-ghost { color: var(--ink); border-color: rgba(11,18,32,.35); }
.tile-light .btn-ghost:hover { background: var(--ink); color: #fff; }
.tile-light .btn-contact { border-color: rgba(11,18,32,.3); }
.tile-light .btn-contact:hover { background: var(--ink); color: #fff; }
.tile-light .status-badge { border-color: var(--hairline); }
.tile-inner { max-width: 1000px; margin: 0 auto; }
.text-center { text-align: center; }
.eyebrow { font-size: .78rem; font-weight: 600; letter-spacing: .16em; text-transform: uppercase; color: var(--faint); margin-bottom: 1rem; }
.section-title { font-family: var(--ff-display); font-weight: 800; font-size: clamp(1.9rem, 4.5vw, 3rem); line-height: 1.1; letter-spacing: -.01em; margin-bottom: 1.3rem; }
.section-lead { font-family: var(--ff-display); font-weight: 400; font-size: clamp(1.1rem, 2vw, 1.35rem); line-height: 1.5; color: var(--muted); max-width: 640px; margin-bottom: 2.5rem; }
.mx-auto { margin-left: auto; margin-right: auto; }

/* ─── SERVICIOS: lista única numerada, todo el contenido vive acá ─── */
.services-list { max-width: 820px; margin: 3rem auto 0; display: flex; flex-direction: column; text-align: left; }
.service-block { display: flex; gap: 1.8rem; padding: 3rem 0; border-top: 1px solid var(--hairline); }
.services-list .service-block:first-child { border-top: none; padding-top: 0; }
.service-block-n { flex-shrink: 0; width: 2.6rem; font-family: var(--ff-display); font-weight: 800; font-size: 1.3rem; color: var(--faint); }
.service-block-body { flex: 1; min-width: 0; }
.service-block-body h3 { font-family: var(--ff-display); font-weight: 700; font-size: clamp(1.3rem, 2.4vw, 1.7rem); margin-bottom: .8rem; }
.service-block-body > p { color: var(--muted); line-height: 1.55; margin-bottom: 1rem; max-width: 640px; }
.service-block-subtitle { font-weight: 700; margin: 1.8rem 0 1rem; font-size: 1rem; }
.service-block-body .agent-steps, .service-block-body .agent-example { margin-left: 0; margin-right: 0; max-width: 620px; }
.service-block-body .why-grid { grid-template-columns: 1fr 1fr; margin-top: 2rem; }
.service-eyebrow { font-size: .78rem; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--faint); margin-bottom: 1.4rem; }
.service-title { font-family: var(--ff-display); font-weight: 700; font-size: clamp(1.6rem, 3vw, 2.3rem); line-height: 1.15; margin-bottom: 1rem; }
.service-desc { color: var(--muted); line-height: 1.5; margin-bottom: 1.8rem; }
.service-list { display: flex; flex-direction: column; gap: .7rem; margin-bottom: 1.8rem; }
.service-list li { font-size: .92rem; color: var(--muted); display: flex; align-items: flex-start; gap: .6rem; }
.service-list li::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: #fff; margin-top: .5rem; flex-shrink: 0; }

/* ─── WHY / CATÁLOGO / PASOS: grilla de 4 tarjetas (reutilizable) ─── */
.why-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 1.4rem; margin-top: 2rem; text-align: left; }
.why-card { background: var(--card); border: 1px solid var(--hairline); border-radius: 16px; padding: 1.8rem 1.5rem; transition: border-color .25s ease, transform .25s ease; }
.why-card:hover { border-color: rgba(255,255,255,.28); transform: translateY(-3px); }
.why-card-stat { font-family: var(--ff-display); font-weight: 800; font-size: 1.9rem; margin-bottom: .5rem; }
.why-card-icon svg { width: 24px; height: 24px; stroke: #fff; margin-bottom: .9rem; }
.why-card-title { font-weight: 600; margin-bottom: .4rem; font-size: 1rem; }
.why-card-desc { font-size: .87rem; color: var(--muted); line-height: 1.45; }
.reveal-d3.visible { transition-delay: .3s; }

/* ─── CONFIANZA: filas en vez de tarjetas, para variar el ritmo visual ─── */
.trust-list { display: flex; flex-direction: column; gap: 1px; margin-top: 2rem; text-align: left; background: var(--hairline); border-radius: 16px; overflow: hidden; }
.trust-row { background: var(--ink-alt); padding: 1.6rem 1.8rem; display: flex; align-items: flex-start; gap: 1.2rem; }
.trust-row-icon { flex-shrink: 0; width: 40px; height: 40px; border-radius: 50%; background: var(--card); display: grid; place-items: center; }
.trust-row-icon svg { width: 19px; height: 19px; stroke: #fff; }
.trust-row-title { font-weight: 600; margin-bottom: .3rem; }
.trust-row-desc { font-size: .9rem; color: var(--muted); line-height: 1.5; }

/* ─── AGENTE: pasos numerados + caja de ejemplo ─── */
.agent-steps { max-width: 640px; margin: 2.2rem auto; text-align: left; display: flex; flex-direction: column; gap: 1.1rem; }
.agent-steps li { display: flex; align-items: flex-start; gap: 1rem; font-size: .95rem; color: var(--muted); line-height: 1.5; }
.agent-step-n {
  flex-shrink: 0; width: 28px; height: 28px; border-radius: 50%; background: var(--card);
  display: grid; place-items: center; font-family: var(--ff-display); font-weight: 700; font-size: .85rem; color: #fff;
}
.agent-example { max-width: 640px; margin: 0 auto 2.2rem; text-align: left; background: var(--card); border: 1px solid var(--hairline); border-radius: 16px; padding: 1.7rem 1.9rem; }
.agent-example-label { font-weight: 700; margin-bottom: .6rem; font-size: .95rem; }
.agent-example-text { color: var(--muted); font-size: .92rem; line-height: 1.55; }

/* ─── ANTES / DESPUÉS ─── */
.contrast-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1.4rem; margin: 2.2rem auto 0; text-align: left; max-width: 900px; }
.contrast-col { background: var(--card); border: 1px solid var(--hairline); border-radius: 16px; padding: 1.8rem 1.6rem; }
.contrast-col-highlight { border-color: rgba(255,255,255,.3); }
.contrast-col-title { font-weight: 700; margin-bottom: 1rem; font-size: 1rem; }
.contrast-row { display: flex; align-items: flex-start; gap: .7rem; padding: .65rem 0; border-top: 1px solid var(--hairline); font-size: .9rem; }
.contrast-row:first-of-type { border-top: none; }
.contrast-icon-x, .contrast-icon-check { width: 16px; height: 16px; flex-shrink: 0; margin-top: 3px; }
.contrast-icon-x { color: var(--faint); }
.contrast-icon-check { color: #fff; }
.contrast-col:not(.contrast-col-highlight) .contrast-row span { color: var(--faint); }
.contrast-col-highlight .contrast-row span { color: #fff; }

/* ─── FAQ: acordeón nativo (details/summary, sin JS) ─── */
.faq-list { max-width: 720px; margin: 2rem auto 0; text-align: left; display: flex; flex-direction: column; gap: .8rem; }
.faq-list details { background: var(--card); border: 1px solid var(--hairline); border-radius: 14px; padding: 1.1rem 1.4rem; }
.faq-list summary {
  cursor: pointer; font-weight: 600; list-style: none;
  display: flex; justify-content: space-between; align-items: center; gap: 1rem;
}
.faq-list summary::-webkit-details-marker { display: none; }
.faq-list summary::after { content: "+"; font-size: 1.3rem; color: var(--faint); flex-shrink: 0; }
.faq-list details[open] summary::after { content: "–"; }
.faq-list details p { margin-top: .8rem; color: var(--muted); font-size: .92rem; line-height: 1.5; }

/* ─── CONTACTO: tarjetas ─── */
.contact-cards { display: flex; gap: 1.3rem; flex-wrap: wrap; margin-top: 2.5rem; }
.contact-card { flex: 1; min-width: 250px; background: var(--card); border: 1px solid var(--hairline); border-radius: 18px; padding: 2rem 1.7rem; display: flex; flex-direction: column; gap: 1.1rem; transition: border-color .25s ease, transform .25s ease; }
.contact-card:hover { border-color: rgba(255,255,255,.3); transform: translateY(-3px); }
.contact-card-icon svg { width: 26px; height: 26px; }
.contact-card-title { font-weight: 700; font-size: 1.05rem; margin-bottom: .3rem; }
.contact-card-sub { font-size: .87rem; color: var(--muted); line-height: 1.4; }
.contact-card-detail { display: block; margin-top: .5rem; font-size: .8rem; color: var(--faint); }
.btn-contact { margin-top: auto; text-align: center; font-size: .85rem; font-weight: 600; border: 1px solid rgba(255,255,255,.3); border-radius: 999px; padding: .65rem 1rem; transition: all .25s ease; }
.btn-contact:hover { background: #fff; color: var(--ink); }

/* ─── FOOTER ─── */
footer.site-footer { background: var(--ink-alt); border-top: 1px solid var(--hairline); padding: 4.5rem 6vw 2rem; }
.footer-inner { max-width: 1000px; margin: 0 auto; display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 2.5rem; margin-bottom: 3rem; }
.footer-wordmark { font-family: var(--ff-display); font-weight: 800; font-size: 1.3rem; letter-spacing: .06em; margin-bottom: .8rem; }
.footer-desc { color: var(--muted); font-size: .9rem; line-height: 1.5; max-width: 320px; margin-bottom: 1.2rem; }
.status-badge { display: inline-flex; align-items: center; gap: .5rem; font-size: .8rem; color: var(--muted); border: 1px solid var(--hairline); border-radius: 999px; padding: .4rem .9rem; }
.status-pulse { width: 8px; height: 8px; border-radius: 50%; background: #4ade80; position: relative; }
.status-pulse::after { content: ""; position: absolute; inset: -4px; border-radius: 50%; border: 1px solid #4ade80; animation: pulse 2s ease-out infinite; }
@keyframes pulse { 0% { opacity: .8; transform: scale(1); } 100% { opacity: 0; transform: scale(2); } }
.footer-col-title { font-size: .8rem; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--faint); margin-bottom: 1rem; }
.footer-links { display: flex; flex-direction: column; gap: .7rem; }
.footer-links a { font-size: .9rem; color: var(--muted); display: flex; align-items: center; gap: .5rem; transition: color .2s ease; }
.footer-links a:hover { color: #fff; }
.footer-links svg { width: 14px; height: 14px; opacity: .6; }
.footer-bottom { max-width: 1000px; margin: 0 auto; display: flex; justify-content: space-between; flex-wrap: wrap; gap: .5rem; border-top: 1px solid var(--hairline); padding-top: 1.5rem; font-size: .78rem; color: var(--faint); }

/* ─── BOTONES FLOTANTES ─── */
.floating-group { position: fixed; right: 20px; bottom: 20px; z-index: 9996; display: flex; flex-direction: column; gap: .7rem; }
.floating-btn {
  width: 48px; height: 48px; border-radius: 50%; display: grid; place-items: center;
  background: var(--card); border: 1px solid var(--hairline); cursor: pointer;
  box-shadow: 0 6px 18px rgba(0,0,0,.35); position: relative;
  opacity: 0; transform: translateY(10px); pointer-events: none;
  transition: opacity .3s ease, transform .3s ease;
}
.floating-btn.visible { opacity: 1; transform: none; pointer-events: auto; }
.floating-btn svg { width: 20px; height: 20px; stroke: #fff; }
.floating-btn-wa { background: #fff; }
.floating-btn-wa svg { stroke: var(--ink); }
.floating-tooltip {
  position: absolute; right: 58px; top: 50%; transform: translateY(-50%);
  background: var(--card); border: 1px solid var(--hairline); border-radius: 6px;
  padding: .35rem .7rem; font-size: .78rem; white-space: nowrap;
  opacity: 0; pointer-events: none; transition: opacity .2s ease;
}
.floating-btn:hover .floating-tooltip { opacity: 1; }

/* ─── SCROLL REVEAL ─── */
.reveal { opacity: 0; transform: translateY(28px); transition: opacity .7s cubic-bezier(.22,1,.36,1), transform .7s cubic-bezier(.22,1,.36,1); }
.reveal.visible { opacity: 1; transform: none; }
.reveal-d1.visible { transition-delay: .1s; }
.reveal-d2.visible { transition-delay: .2s; }

@media (max-width: 860px) {
  .nav-links { display: none; }
  .hamburger { display: flex; }
  .service-block { flex-direction: column; gap: .8rem; }
  .service-block-body .why-grid { grid-template-columns: 1fr; max-width: none; }
  .footer-inner { grid-template-columns: 1fr; }
  .contrast-grid { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  .ticker-track { animation: none; }
}
