/* ---------- Variables: cambiando estas se cambia todo el sitio ---------- */
:root {
  --bg: #000;
  --text: #fff;
  --muted: #c9c9c9;
  /* Paleta tomada del logo de VGS (#38917f) y variantes */
  --green: #38917f;
  --violet: #2a6f7f;
  --neon: #5fb9a5;
  --pale: #a9dccf;
  --card: #0a0a0a;
  --line: #1f1f1f;
  --wrap: 1140px;
  --font: "Poppins", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --ease: cubic-bezier(.22, .61, .36, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }

.wrap { width: min(100% - 48px, var(--wrap)); margin-inline: auto; }
.wrap.narrow { width: min(100% - 48px, 900px); }
.section { padding: 90px 0; }

/* Texto con degradé verde -> violeta */
.grad {
  background: linear-gradient(90deg, var(--pale) 0%, var(--neon) 45%, var(--green) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}

.title { font-size: clamp(28px, 4vw, 42px); font-weight: 500; line-height: 1.2; margin: 0 0 26px; }
.eyebrow { font-size: clamp(26px, 3.2vw, 34px); font-weight: 400; margin: 0 0 6px; display: inline-block; }
.center { text-align: center; }
.lead { font-size: clamp(17px, 1.7vw, 21px); text-align: center; margin: 0 auto 26px; color: #f1f1f1; }
.lead.left { text-align: left; margin-left: 0; }
.dark { color: #000; }

/* ---------- Hero ---------- */
.first-screen { min-height: 100vh; min-height: 100svh; display: flex; flex-direction: column; }
.hero {
  position: relative;
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 60px 24px 40px;
  text-align: center;
  isolation: isolate;
}
.hero-logo { width: 160px; margin: 0 auto 38px; }
.hero-title { font-size: clamp(32px, 5.2vw, 54px); font-weight: 600; line-height: 1.18; margin: 0 auto 40px; max-width: 860px; min-height: 2.4em; }
.hero-sub { font-size: clamp(16px, 1.8vw, 20px); margin: 0 auto; max-width: 1000px; }
/* fadeIn lento (2 s), igual que "animated-slow" del original */
.fade { animation: fadeIn 2s ease both; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

/* ---------- Tarjetas ---------- */
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 40px; text-align: center; }
.card { padding: 10px 10px 20px; }
.card .icon { width: 50px; height: 50px; margin: 0 auto 20px; color: #fff; }
.card h3 { font-size: 24px; font-weight: 600; line-height: 1.25; margin: 0 0 14px; }
.card p { margin: 0 auto; font-size: 16px; color: var(--muted); max-width: 340px; }

/* ---------- Franja de foto con bordes en pico ---------- */
.band {
  height: 300px;
  margin: 20px 0;
  background:
    linear-gradient(rgba(0, 0, 0, .35), rgba(0, 0, 0, .35)),
    url("../img/code-band.jpg") center / cover no-repeat;
  clip-path: polygon(0 14%, 8% 6%, 17% 15%, 27% 3%, 38% 13%, 49% 2%, 60% 12%, 71% 4%, 82% 13%, 91% 5%, 100% 12%,
                     100% 88%, 91% 96%, 82% 87%, 71% 97%, 60% 88%, 49% 98%, 38% 87%, 27% 97%, 17% 86%, 8% 95%, 0 87%);
}

/* ---------- Dos columnas ---------- */
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 64px; align-items: center; }
.shot { width: 100%; border-radius: 14px; }

/* ---------- Arcos de progreso ---------- */
.arcs { margin-top: 56px; align-items: start; }
.arc { padding: 0 10px; position: relative; }
.arc-wrap { position: relative; width: 240px; max-width: 100%; margin: 0 auto 22px; }
.arc-val { position: absolute; left: 0; right: 0; bottom: 0; text-align: center; font-size: 22px; font-weight: 500; line-height: 1; }
.arc-svg { display: block; width: 100%; overflow: visible; }
.arc-svg path { fill: none; }
.arc-trail { stroke: #eee; stroke-width: 1; }
.arc-bar { stroke-width: 5; stroke-dasharray: 100; transition: stroke-dashoffset 1.5s ease-in-out; }
.arc h3 { font-size: 16px; font-weight: 500; margin: 0 0 22px; }
.arc p { font-size: 15px; margin: 0 auto; max-width: 300px; color: var(--muted); }
.arc strong { color: #fff; font-weight: 600; }

/* ---------- CTA con botón neón giratorio ---------- */
@property --angle { syntax: "<angle>"; initial-value: 0deg; inherits: false; }
.btn {
  position: relative;
  display: inline-block;
  color: var(--neon);
  text-decoration: none;
  isolation: isolate;
  }
/* ::after es el borde que gira; ::before es el resplandor desenfocado */
.btn::before, .btn::after {
  content: "";
  position: absolute;
  inset: -2px;
  z-index: -1;
  background: conic-gradient(from var(--angle), rgba(255, 0, 55, 0) 50deg, var(--neon) 360deg);
  animation: spin 2.4s linear infinite;
}
.btn::before { filter: blur(18px); opacity: .85; }
.btn span { position: relative; z-index: 1; display: block; padding: 16px 34px; background: #000; }
.btn span { transition: background .5s, color .5s; }
.btn:hover span { background: var(--neon); color: #000; }
@keyframes spin { to { --angle: 360deg; } }

/* ---------- Acordeón ---------- */
.acc details { background: var(--card); border: 1px solid var(--line); margin-bottom: 14px; transition: border-color .25s; }
.acc details[open], .acc details:hover { border-color: #2e2e2e; }
.acc summary { display: flex; align-items: center; gap: 18px; cursor: pointer; list-style: none; font-size: 15px; padding-right: 18px; }
.acc summary::-webkit-details-marker { display: none; }
.acc summary::after { content: "+"; margin-left: auto; font-size: 26px; font-weight: 300; color: #8a8a8a; transition: transform .3s var(--ease); }
.acc details[open] summary::after { transform: rotate(45deg); }
.acc-ico { display: grid; place-items: center; width: 56px; height: 56px; background: var(--green); flex: none; }
.acc-ico svg { width: 24px; height: 24px; fill: none; stroke: #000; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.acc details p { margin: 0; padding: 18px 22px 22px; font-size: 15px; color: var(--muted); animation: open .35s var(--ease); }
@keyframes open { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }

/* ---------- Proyectos ---------- */
.projects { display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px; margin-top: 48px; }
.project { background: var(--card); border: 1px solid var(--line); border-radius: 16px; overflow: hidden; }
.project .pic { overflow: hidden; aspect-ratio: 2 / 1; background: #050505; }
.project .pic img { width: 100%; height: 100%; object-fit: cover; }
.project .body { padding: 22px 24px 28px; }
.project h3 { font-size: 18px; font-weight: 600; margin: 0 0 2px; }
.project .kind { color: var(--green); margin: 0 0 14px; font-size: 15px; }
.project p { font-size: 15px; color: var(--muted); margin: 0; }
.project .body > p:last-child { line-height: 1.6; }

/* ---------- Formulario ---------- */
.contact { gap: 80px; }
.form-title { font-size: 24px; font-weight: 500; margin: 0 0 12px; }
.form-intro { font-size: 14px; color: var(--muted); margin: 0 0 28px; }
.form label { display: block; font-size: 14px; margin-bottom: 18px; }
.form input[type=text], .form input[type=email], .form input[type=tel], .form textarea {
  display: block; width: 100%; margin-top: 6px; padding: 12px 14px; font: inherit; color: #fff;
  background: #0a0a0a; border: 1px solid #333; border-radius: 6px;
  transition: border-color .2s, box-shadow .2s;
}
.form input:focus, .form textarea:focus { outline: 0; border-color: var(--neon); box-shadow: 0 0 0 3px rgba(95, 185, 165, .15); }
.form button { font: inherit; font-size: 17px; color: #fff; background: transparent; border: 1px solid #fff; border-radius: 8px; padding: 10px 30px; cursor: pointer; transition: background .25s, color .25s, transform .25s; }
.form button:hover:not(:disabled) { background: #fff; color: #000; transform: translateY(-2px); }
.form button:disabled { opacity: .5; cursor: wait; }
.form-status { margin: 16px 0 0; font-size: 14px; color: var(--neon); }
.hp { position: absolute; left: -9999px; }

/* ---------- Trust (fondo blanco) ---------- */
.trust { background: #fff; padding: 80px 0; }

/* ---------- Footer ---------- */
.footer { position: relative; background: #050505; color: var(--muted); padding: 64px 0 28px; font-size: 15px; }
.footer::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 1px; background: linear-gradient(90deg, transparent, var(--green) 30%, var(--violet) 70%, transparent); }
.foot-grid { display: grid; grid-template-columns: 2fr 1fr 1.2fr; gap: 48px; align-items: start; }
.foot-brand img { width: 170px; margin: 0 0 18px; }
.foot-brand p { margin: 0; max-width: 360px; line-height: 1.6; }
.foot-col h3 { margin: 0 0 14px; font-size: 12px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--green); }
.foot-col a { display: block; width: fit-content; margin: 0 0 9px; color: var(--muted); text-decoration: none; transition: color .2s; }
.foot-col a:hover { color: var(--neon); }
.foot-bottom { display: flex; justify-content: space-between; gap: 16px; margin-top: 48px; padding-top: 22px; border-top: 1px solid var(--line); font-size: 13px; color: #777; }

/* ---------- Botón volver arriba ---------- */
.to-top { position: fixed; right: 22px; bottom: 22px; width: 46px; height: 46px; border-radius: 50%; border: 1px solid var(--neon); background: rgba(0, 0, 0, .75); color: var(--neon); cursor: pointer; display: grid; place-items: center; opacity: 0; pointer-events: none; transform: translateY(10px); transition: opacity .3s, transform .3s, background .2s; backdrop-filter: blur(6px); z-index: 10; }
.to-top.show { opacity: 1; pointer-events: auto; transform: none; }
.to-top:hover { background: var(--neon); color: #000; }
.to-top svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- Mobile ---------- */
@media (max-width: 860px) {
  .section { padding: 60px 0; }
  .hero { padding-top: 100px; }
  .cards, .projects, .two-col, .foot-grid { grid-template-columns: 1fr; }
  .two-col { gap: 34px; }
  .two-col.reverse > img { order: -1; }
  .cards { gap: 34px; }
  .foot-grid { gap: 32px; }
  .foot-bottom { flex-direction: column; gap: 4px; padding-right: 60px; }
  .footer { padding-top: 48px; }
  .band { height: 200px; }
  .smart { grid-template-columns: 1fr; }
}

/* ---------- Carrusel (js/main.js) ---------- */
.carousel { position: relative; min-width: 0; }
.carousel .viewport { overflow: hidden; }
.carousel .track { display: flex; will-change: transform; }
.carousel .slide { flex: 0 0 auto; }
.carousel .slide img { width: 100%; height: auto; margin: 0 auto; }
.carousel .nav { position: absolute; top: 50%; width: 30px; height: 30px; margin-top: -15px; padding: 0; border: 0; background: none; cursor: pointer; z-index: 2; color: rgba(237, 237, 237, .9); transition: color .2s; }
.carousel .nav::before { content: ""; position: absolute; inset: 7px; border: solid currentColor; border-width: 0 0 2.5px 2.5px; width: 12px; height: 12px; box-sizing: border-box; }
.carousel .nav.prev { left: 14px; } .carousel .nav.prev::before { transform: translateX(3px) rotate(45deg); }
.carousel .nav.next { right: 14px; } .carousel .nav.next::before { transform: translateX(-3px) rotate(-135deg); }
.carousel .nav:hover:not(:disabled) { color: #fff; }
.carousel .nav:disabled { opacity: .25; cursor: default; }
.carousel .dots { display: flex; justify-content: center; gap: 12px; padding: 22px 0 0; }
.carousel .dots button { width: 6px; height: 6px; padding: 0; border: 0; border-radius: 50%; background: #fff; opacity: .3; cursor: pointer; transition: opacity .2s; }
.carousel .dots button.on { opacity: 1; }

.carousel.phone .slide img { max-width: 167px; }
.carousel.phone .nav { color: rgba(255, 255, 255, .3); }
.carousel.phone .nav:hover:not(:disabled) { color: #fff; }

.smart { display: grid; grid-template-columns: 1fr 2fr 1fr; gap: 30px; align-items: center; }
.smart > * { min-width: 0; }

/* ---------- Tilt con el mouse ---------- */
[data-tilt] { transition: transform .15s ease-out; will-change: transform; }

@media (max-width: 860px) {
  .smart { grid-template-columns: 1fr; gap: 40px; }
  .smart > div:not(.carousel) { order: -1; }
  .carousel.phone { max-width: 260px; width: 100%; margin: 0 auto; }
}

/* ---------- Franja de logos: ancho completo, pegada al borde inferior de la primera pantalla ---------- */
.logo-label { margin: 0 0 4px; text-align: center; font-size: 13px; font-weight: 500; letter-spacing: .22em; text-transform: uppercase; color: var(--muted); }
.logo-marquee { overflow: hidden; width: 100%; padding: 0 0 36px; }
.logo-track { display: flex; width: max-content; animation: logo-scroll 90s linear infinite; }
/* Cada logo esta recortado a su contenido y trae su tamano en --w/--h (px a escala 1),
   calculado para que todos pesen parecido. La separacion es entre bordes reales del logo. */
.logo-set { --k: .78; display: flex; align-items: center; gap: 56px; padding-right: 56px; height: 100px; }
.logo-set img { width: calc(var(--w) * var(--k) * 1px); height: calc(var(--h) * var(--k) * 1px); object-fit: contain; flex: none; transform: translateY(calc(var(--dy, 0) * var(--k) * 1px)); filter: brightness(0) invert(1); }
@keyframes logo-scroll { to { transform: translateX(-50%); } }
@media (max-width: 860px) { .logo-set { --k: .62; gap: 38px; padding-right: 38px; height: 80px; } .logo-track { animation-duration: 70s; } }

/* Mapa de países */
.map-section { position: relative; padding: 110px 0 120px; background: radial-gradient(ellipse 70% 55% at 50% 58%, rgba(56, 145, 127, .10), transparent 70%), radial-gradient(ellipse 45% 40% at 30% 75%, rgba(42, 111, 127, .10), transparent 70%); }
.map-section .title { font-size: clamp(32px, 4.6vw, 52px); }
.wrap.wide { width: min(100% - 32px, 1440px); }
.map { position: relative; margin: 40px auto 0; }
.map-stage { position: relative; }
.map-svg { display: block; width: 100%; height: auto; }
.map-land { fill: #1b1b1b; stroke: #0a0a0a; stroke-width: .4; }
.map-hi { fill: var(--green); fill-opacity: .45; stroke: var(--neon); stroke-width: .8; transition: fill-opacity .3s; }
.map-hi.on { fill-opacity: .85; }
.map .pin { position: absolute; width: 32px; height: 32px; margin: -16px 0 0 -16px; border: 0; padding: 0; background: none; cursor: pointer; border-radius: 50%; }
.map .pin::before { content: ""; position: absolute; inset: 9px; border-radius: 50%; background: #fff; box-shadow: 0 0 0 2px rgba(95, 185, 165, .6); }
.map .pin::after { content: ""; position: absolute; inset: 5px; border-radius: 50%; background: var(--neon); opacity: 0; animation: pin-pulse 2.4s ease-out infinite; }
.map .pin.on::before { background: var(--neon); }
.map .pin:focus-visible { outline: 2px solid var(--neon); outline-offset: 2px; }
@keyframes pin-pulse { 0% { transform: scale(1); opacity: .8; } 100% { transform: scale(3.6); opacity: 0; } }
.map-panel { position: absolute; right: 1%; bottom: 4%; width: min(380px, 30%); background: rgba(10, 10, 10, .92); border: 1px solid var(--line); border-radius: 16px; padding: 22px 24px 18px; backdrop-filter: blur(4px); }
.map-panel.wide { width: min(620px, 44%); }
.map-panel.wide .mp.on ul { display: grid; grid-template-columns: 1fr 1fr; column-gap: 18px; }
.map-panel.wide .mp li:nth-child(2) { border-top: 0; }
.mp h3 { font-size: 22px; font-weight: 600; margin: 0 0 10px; color: var(--green); }
.mp ul { list-style: none; margin: 0; padding: 0; }
.mp li { padding: 8px 0 8px 18px; position: relative; border-top: 1px solid var(--line); line-height: 1.35; }
.mp li:first-child { border-top: 0; }
.mp li::before { content: ""; position: absolute; left: 0; top: 16px; width: 7px; height: 7px; border-radius: 50%; background: #444; }
.mp li.big::before { background: var(--neon); }
.mp strong { display: block; font-size: 16px; font-weight: 600; }
.mp li span { display: block; font-size: 14px; color: var(--muted); }
.js .mp { display: none; }
.js .mp.on { display: block; animation: fadeIn .4s ease both; }
@media (max-width: 860px) {
  .map-section { padding: 80px 0; }
  .map-stage { width: 190%; margin-left: -14%; }
  .map { overflow: hidden; margin-top: 28px; }
  .map-panel, .map-panel.wide { position: static; width: auto; margin-top: 16px; backdrop-filter: none; }
  .map-panel.wide .mp.on ul { grid-template-columns: 1fr; }
  .map-panel.wide .mp li:nth-child(2) { border-top: 1px solid var(--line); }
}

/* Proyectos principales: 6 tarjetas, dos filas de tres */
.projects { grid-template-columns: repeat(3, 1fr); }
@media (max-width: 1000px) { .projects { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 860px) { .projects { grid-template-columns: 1fr; } }

/* Plataformas */
.platforms { display: grid; grid-template-columns: 1fr 1fr; gap: 22px 26px; margin-top: 30px; }
.plat { display: flex; gap: 12px; align-items: center; }
.plat svg { width: 30px; height: 30px; flex: none; color: var(--green); margin-top: 2px; }
.plat h3 { font-size: 16px; font-weight: 600; margin: 0; }
.plat p { margin: 0; font-size: 14px; line-height: 1.55; color: var(--muted); }
@media (max-width: 600px) { .platforms { gap: 16px; } .plat h3 { font-size: 14.5px; } }

/* Clientes en numeros */
.facts { display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px; margin-top: 52px; }
.fact { background: var(--card); border: 1px solid var(--line); border-radius: 18px; padding: 0 26px 28px; position: relative; overflow: hidden; display: flex; flex-direction: column; transition: border-color .3s, transform .3s var(--ease); }
/* Cabecera con el logo del cliente, separada del dato por una linea fina */
.fact-head { height: 84px; margin: 0 -26px 26px; padding: 0 26px; display: flex; align-items: center; justify-content: space-between; gap: 12px; border-bottom: 1px solid var(--line); background: linear-gradient(180deg, rgba(255, 255, 255, .025), transparent); }
.fact-head img { height: var(--h); width: auto; max-width: 70%; filter: brightness(0) invert(1); opacity: .9; }
.fact-num { margin: 0; font-size: clamp(44px, 4.2vw, 58px); font-weight: 600; line-height: 1; letter-spacing: -.01em; background: linear-gradient(90deg, #fff 30%, var(--neon)); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; font-variant-numeric: tabular-nums; }
.fact-unit { margin: 10px 0 16px; padding-bottom: 16px; font-size: 16px; font-weight: 500; line-height: 1.35; color: var(--neon); border-bottom: 1px dashed rgba(255, 255, 255, .08); }
.fact-text { margin: 0; font-size: 14.5px; color: var(--muted); line-height: 1.6; }
.fact-badge { flex: none; margin: 0; font-size: 11px; font-weight: 600; letter-spacing: .06em; padding: 3px 9px; border: 1px solid #333; border-radius: 999px; color: var(--text); }
.fact:hover { border-color: #2f2f2f; transform: translateY(-4px); }
@media (max-width: 1100px) { .facts { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .facts { grid-template-columns: 1fr; } }

/* Contacto: cierre de la pagina */
.contact-section { padding-bottom: 110px; background: radial-gradient(ellipse 60% 70% at 85% 50%, rgba(42, 111, 127, .10), transparent 70%); }
.contact { align-items: center; }
.contact-list { list-style: none; margin: 32px 0 0; padding: 0; }
.contact-list li { padding: 14px 0; border-top: 1px solid var(--line); font-size: 16px; }
.contact-list li span { display: block; font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--green); margin-bottom: 2px; }
.contact-list a { text-decoration: none; border-bottom: 1px solid #444; transition: border-color .25s; }
.contact-list a:hover { border-color: var(--neon); }
.contact .form { background: var(--card); border: 1px solid var(--line); border-radius: 18px; padding: 32px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
@media (max-width: 600px) { .form-row { grid-template-columns: 1fr; gap: 0; } .contact .form { padding: 24px 20px; } }

/* Botones de paises arriba del mapa */
.map-tabs { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin: 0 0 22px; }
.map-tab { font: inherit; font-size: 14px; color: var(--muted); background: transparent; border: 1px solid #2a2a2a; border-radius: 999px; padding: 7px 18px; cursor: pointer; transition: color .2s, border-color .2s, background .2s; }
.map-tab:hover { color: #fff; border-color: #555; }
.map-tab.on { color: #000; background: var(--neon); border-color: var(--neon); }
@media (max-width: 860px) { .map-tab { font-size: 13px; padding: 6px 14px; } .map .pin { width: 26px; height: 26px; margin: -13px 0 0 -13px; } .map .pin::before { inset: 7px; } }

/* =====================================================================
   Efectos
   ===================================================================== */

/* Barra de progreso arriba */
.progress { position: fixed; left: 0; top: 0; height: 2px; width: 100%; z-index: 30; transform-origin: 0 50%; transform: scaleX(var(--p, 0)); background: linear-gradient(90deg, var(--green), var(--violet)); pointer-events: none; }

/* Menu fijo: aparece al pasar la primera pantalla */
.topbar { position: fixed; left: 0; right: 0; top: 0; z-index: 20; background: rgba(0, 0, 0, .62); backdrop-filter: blur(14px) saturate(140%); -webkit-backdrop-filter: blur(14px) saturate(140%); border-bottom: 1px solid rgba(255, 255, 255, .06); transform: translateY(-100%); transition: transform .45s var(--ease); }
.topbar.show { transform: none; }
.topbar-in { display: flex; align-items: center; gap: 28px; height: 64px; }
.topbar-logo img { width: 104px; }
.topbar-links { display: flex; gap: 26px; margin-left: auto; }
.topbar-links a { position: relative; font-size: 14px; color: var(--muted); text-decoration: none; transition: color .2s; }
.topbar-links a::after { content: ""; position: absolute; left: 0; right: 0; bottom: -6px; height: 1px; background: var(--neon); transform: scaleX(0); transition: transform .3s var(--ease); }
.topbar-links a:hover, .topbar-links a.on { color: #fff; }
.topbar-links a:hover::after, .topbar-links a.on::after { transform: scaleX(1); }
.topbar-cta { font-size: 14px; font-weight: 500; color: #000; background: var(--neon); text-decoration: none; padding: 8px 18px; border-radius: 999px; transition: box-shadow .3s, transform .3s var(--ease); }
.topbar-cta:hover { box-shadow: 0 0 24px rgba(95, 185, 165, .55); transform: translateY(-1px); }
@media (max-width: 700px) { .topbar-links { display: none; } .topbar-cta { margin-left: auto; } }

/* Portada: dos luces que se mueven despacio */
.hero::before { content: ""; position: absolute; z-index: -1; pointer-events: none; }
.hero::before { inset: -10% -10% 0; background: radial-gradient(38% 42% at 30% 40%, rgba(56, 145, 127, .20), transparent 70%), radial-gradient(34% 40% at 72% 58%, rgba(42, 111, 127, .22), transparent 70%); filter: blur(30px); animation: aurora 16s ease-in-out infinite alternate; }
@keyframes aurora { 0% { transform: translate3d(-4%, -2%, 0) scale(1); } 50% { transform: translate3d(3%, 3%, 0) scale(1.08); } 100% { transform: translate3d(5%, -3%, 0) scale(.96); } }
.hero-title { text-shadow: 0 0 40px rgba(42, 111, 127, .25); }
.hero-sub.fade { animation-delay: .4s; }
/* Llamados a la accion y cifras de la empresa, debajo del subtitulo */
.hero-cta { display: flex; justify-content: center; flex-wrap: wrap; gap: 14px; margin-top: 38px; animation-delay: .7s; }
.hero-cta a { font-size: 15px; font-weight: 500; text-decoration: none; padding: 13px 26px; border-radius: 999px; transition: box-shadow .3s, transform .3s var(--ease), border-color .3s, color .3s; }
.cta-main { color: #000; background: var(--neon); }
.cta-main:hover { box-shadow: 0 0 28px rgba(95, 185, 165, .55); transform: translateY(-1px); }
.cta-alt { color: var(--text); border: 1px solid #333; }
.cta-alt:hover { border-color: var(--neon); color: var(--neon); }
.hero-proof { list-style: none; display: flex; justify-content: center; flex-wrap: wrap; gap: 10px 0; margin: 34px 0 0; padding: 0; font-size: 14px; color: var(--muted); animation-delay: 1s; }
.hero-proof li { padding: 0 22px; }
.hero-proof li + li { border-left: 1px solid #2a2a2a; }
.hero-proof b { color: var(--text); font-weight: 600; font-size: 16px; margin-right: 4px; }
@media (max-width: 600px) { .hero-proof { display: grid; grid-template-columns: repeat(2, auto); justify-content: center; } .hero-proof li { padding: 0 18px; } .hero-proof li + li { border-left: 0; } .hero-proof li:nth-child(even) { border-left: 1px solid #2a2a2a; } .hero-cta a { padding: 12px 20px; } }
.first-screen { overflow: hidden; }

/* El degrade de los titulos se desplaza lento */
.grad { background-size: 200% 100%; animation: grad-move 7s ease-in-out infinite alternate; }
@keyframes grad-move { from { background-position: 0% 50%; } to { background-position: 100% 50%; } }

/* Aparicion al hacer scroll (la clase .rv la pone el JS, sin JS todo se ve) */
.rv { opacity: 0; transform: translate3d(0, 34px, 0); transition: opacity .9s var(--ease), transform .9s var(--ease); transition-delay: var(--d, 0ms); }
.rv.rv-scale { transform: scale(.96); }
.rv.in { opacity: 1; transform: none; }

/* Tarjetas: luz que sigue al mouse y borde que se enciende */
@property --spot { syntax: "<number>"; initial-value: 0; inherits: false; }
.fact, .contact .form {
  background-image: radial-gradient(420px circle at var(--mx, 50%) var(--my, 50%), rgba(95, 185, 165, calc(var(--spot) * .09)), transparent 45%);
}
.fact.in, .project.in, .contact .form.in { transition: --spot .4s, border-color .3s, box-shadow .45s var(--ease), opacity .9s var(--ease), transform .6s var(--ease); transition-delay: 0s, 0s, 0s, var(--d, 0ms), var(--d, 0ms); }
.fact:hover { --spot: 1; border-color: rgba(95, 185, 165, .35); transform: translateY(-6px); box-shadow: 0 18px 50px -20px rgba(95, 185, 165, .25); }
.contact .form:hover, .contact .form:focus-within { --spot: 1; border-color: rgba(95, 185, 165, .25); }
.project:hover { border-color: #2c2c2c; }

/* Plataformas: el icono reacciona */
.plat { padding: 10px; margin: -10px; border-radius: 12px; }
.plat.in { transition: background .3s, opacity .9s var(--ease), transform .9s var(--ease); transition-delay: 0s, var(--d, 0ms), var(--d, 0ms); }
.plat svg { transition: transform .4s var(--ease), color .3s, filter .3s; }
.plat:hover { background: rgba(255, 255, 255, .03); }
.plat:hover svg { transform: translateY(-3px) scale(1.08); color: var(--neon); filter: drop-shadow(0 0 8px rgba(95, 185, 165, .6)); }

/* Acordeon y botones de pais */
.acc details:hover { background: #0e0e0e; }
.acc-ico { transition: background .3s; }
.acc details[open] .acc-ico { background: var(--neon); }
.map-tab.on { box-shadow: 0 0 18px rgba(95, 185, 165, .45); }

/* Formulario */
.form button { position: relative; overflow: hidden; }
.form button::after { content: ""; position: absolute; top: 0; bottom: 0; width: 40%; left: -60%; background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .35), transparent); transform: skewX(-20deg); transition: left .7s var(--ease); }
.form button:hover::after { left: 130%; }

/* Imagen con inclinacion: sombra con color */
.shot[data-tilt] { filter: drop-shadow(0 30px 60px rgba(42, 111, 127, .25)); }
.shot[data-tilt].in { transition: opacity .9s var(--ease), transform .3s ease-out; }
.acc details.rv { transition: opacity .9s var(--ease), transform .9s var(--ease), border-color .25s, background .3s; transition-delay: var(--d, 0ms), var(--d, 0ms), 0s, 0s; }
section[id] { scroll-margin-top: 56px; }

/* ---------- Seccion de IA ---------- */
.ai-section { background: radial-gradient(ellipse 55% 45% at 20% 40%, rgba(56, 145, 127, .10), transparent 70%), radial-gradient(ellipse 50% 50% at 85% 70%, rgba(42, 111, 127, .12), transparent 70%); }
.live { width: 7px; height: 7px; border-radius: 50%; background: var(--neon); animation: live 2s infinite; }
@keyframes live { 70% { box-shadow: 0 0 0 8px rgba(95, 185, 165, 0); } 0% { box-shadow: 0 0 0 0 rgba(95, 185, 165, .7); } }

/* ---------- Mas degrade en el resto ---------- */
/* Tarjetas de numeros con un brillo de color abajo */
.fact { background-color: #090c0b; }
.fact::after { content: ""; position: absolute; left: -20%; right: -20%; bottom: -60%; height: 90%; background: radial-gradient(closest-side, rgba(56, 145, 127, .16), transparent); pointer-events: none; }
/* Separadores en degrade entre secciones */
.section + .section::before { content: ""; position: absolute; left: 50%; top: 0; width: min(70%, 900px); height: 1px; transform: translateX(-50%); background: linear-gradient(90deg, transparent, rgba(95, 185, 165, .35), transparent); }
.section { position: relative; }
/* Contacto y CTA con fondo en degrade */
.cta { background: radial-gradient(ellipse 50% 70% at 50% 50%, rgba(56, 145, 127, .14), transparent 70%); }
.contact-section { background: radial-gradient(ellipse 60% 70% at 85% 50%, rgba(42, 111, 127, .16), transparent 70%), radial-gradient(ellipse 40% 50% at 10% 20%, rgba(56, 145, 127, .10), transparent 70%); }

/* Capturas de Theo: el inicio grande y un panel encima, abajo a la derecha */
.ai-shot { margin: 48px auto 0; max-width: 1000px; }
.ai-shot-stage { position: relative; padding: 0 8% 9% 0; }
.ai-shot img { display: block; border-radius: 14px; border: 1px solid transparent; padding: 1px; background: linear-gradient(140deg, rgba(169, 220, 207, .5), rgba(56, 145, 127, .12) 45%, rgba(42, 111, 127, .45)) border-box; }
.ai-shot .main { width: 100%; box-shadow: 0 30px 80px -30px rgba(56, 145, 127, .45); }
.ai-shot .over { position: absolute; right: 0; bottom: 0; width: 46%; box-shadow: 0 24px 60px -10px rgba(0, 0, 0, .8); }
.ai-shot figcaption { margin-top: 16px; text-align: center; font-size: 13.5px; color: var(--muted); }
.ai-shot.flip .ai-shot-stage { padding: 0 0 9% 8%; }
.ai-shot.flip .over { right: auto; left: 0; }
.ai-shot.tall .over { width: 36%; }
/* IA: tres casos en pestanas, texto a la izquierda e imagen a la derecha */
.ai-tabs { display: flex; justify-content: center; flex-wrap: wrap; gap: 10px; margin: 40px 0 34px; }
.ai-tabs button { display: grid; grid-template-columns: auto 1fr; align-items: center; column-gap: 9px; text-align: left; font: inherit; color: var(--muted); background: rgba(255, 255, 255, .02); border: 1px solid var(--line); border-radius: 14px; padding: 11px 18px; cursor: pointer; transition: border-color .25s, color .25s, background .25s; }
.ai-tabs button { font-size: 15px; font-weight: 600; }
.ai-tabs button small { grid-column: 2; font-size: 12px; font-weight: 400; color: var(--muted); }
.ai-tabs button .live { opacity: .35; animation: none; }
.ai-tabs button:hover { border-color: #3a3f3d; color: var(--text); }
.ai-tabs button[aria-selected="true"] { color: var(--text); border-color: rgba(95, 185, 165, .55); background: rgba(95, 185, 165, .07); }
.ai-tabs button[aria-selected="true"] .live { opacity: 1; animation: live 2s infinite; }
.ai-panel { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.75fr); gap: 44px; align-items: center; animation: aipanel .45s var(--ease); }
.ai-panel[hidden] { display: none; }
@keyframes aipanel { from { opacity: 0; transform: translateY(10px); } }
.ai-text h3 { margin: 0 0 14px; font-size: 26px; font-weight: 600; }
.ai-text p { margin: 0 0 12px; font-size: 16px; line-height: 1.7; color: var(--muted); }
.ai-text p .hl { color: var(--text); font-weight: 500; }
.ai-panel .ai-shot { margin: 0; max-width: none; }
.ai-panel .ai-shot[hidden] { display: none; }
.agents { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin: 18px 0 16px; }
.agent { text-align: center; }
.agent img { width: 58px; height: 58px; border-radius: 50%; display: block; margin: 0 auto 6px; border: 2px solid var(--c); box-shadow: 0 0 16px -4px var(--c); }
.agent b { display: block; font-size: 14px; font-weight: 600; }
.agent span { display: block; font-size: 10.5px; letter-spacing: .08em; text-transform: uppercase; color: var(--c); }
.ai-views { display: inline-flex; gap: 4px; padding: 4px; border: 1px solid var(--line); border-radius: 999px; }
.ai-views button { font: inherit; font-size: 13px; color: var(--muted); background: none; border: 0; border-radius: 999px; padding: 6px 14px; cursor: pointer; }
.ai-views button.on { background: rgba(95, 185, 165, .14); color: var(--text); }
@media (max-width: 900px) { .ai-panel { grid-template-columns: minmax(0, 1fr); gap: 26px; } .ai-tabs button { flex: 1 1 100%; } }
.privacy-note { max-width: 640px; margin: 48px auto 0; text-align: center; font-size: 13px; color: var(--muted); }
@media (max-width: 600px) { .ai-shot-stage { padding: 0; } .ai-shot .over { position: static; width: 100%; margin-top: 14px; } }

/* Un mismo sistema en notebook, tablet y celular */
.devices { margin: 0; }
/* Notebook, tablet y celular apoyados sobre la misma linea, con marcos finos */
.devices-stage { position: relative; width: 100%; max-width: 600px; margin: 0 auto; aspect-ratio: 600 / 340; }
.devices-stage::after { content: ""; position: absolute; left: 4%; right: 4%; bottom: 1.5%; height: 5%; border-radius: 50%; background: radial-gradient(closest-side, rgba(0, 0, 0, .75), transparent); filter: blur(4px); z-index: 0; }
.dv { position: absolute; bottom: 4%; z-index: 1; transform-origin: 50% 100%; }
.dv img { display: block; width: 100%; height: auto; }
.dv.laptop { left: 7%; width: 86%; bottom: 4%; }
.dv.laptop .scr { position: relative; padding: 2.2% 1.9% 2.6%; border-radius: 3.2% / 5%; background: #0c0d0d; box-shadow: 0 0 0 1px #4d5351, 0 0 0 2px #151817, inset 0 0 0 1px rgba(255, 255, 255, .05); }
.dv.laptop .scr img { border-radius: 2px; aspect-ratio: 16 / 10; object-fit: cover; object-position: left top; }
.dv.laptop .scr::before { content: ""; position: absolute; top: .8%; left: 50%; width: 4px; height: 4px; margin-left: -2px; border-radius: 50%; background: #23303b; box-shadow: 0 0 0 1px #0a0b0b; }
.dv.laptop .base { position: relative; margin: 0 -8%; aspect-ratio: 100 / 2.6; border-radius: 0 0 50% 50% / 0 0 100% 100%; background: linear-gradient(#6a706e, #3d4240 30%, #202322 75%, #151716); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .25); }
.dv.laptop .base::before { content: ""; position: absolute; top: 0; left: 50%; width: 14%; height: 45%; transform: translateX(-50%); border-radius: 0 0 6px 6px; background: linear-gradient(#2a2e2d, #3a3f3d); }
.dv.tablet { right: 0; width: 29%; padding: 1.1%; border-radius: 9% / 6.6%; background: #0c0d0d; box-shadow: 0 0 0 1px #575d5b, 0 0 0 2px #1a1d1c, -18px 26px 50px -18px rgba(0, 0, 0, .9); }
.dv.tablet img { border-radius: 5.5% / 4.1%; }
.dv.tablet::before { content: ""; position: absolute; top: .55%; left: 50%; width: 3px; height: 3px; margin-left: -1.5px; border-radius: 50%; background: #23303b; }
.dv.phone { left: 1%; width: 16.5%; padding: .75%; border-radius: 16% / 7.5%; background: #0c0d0d; box-shadow: 0 0 0 1px #5a605e, 0 0 0 2.5px #1c1f1e, 18px 26px 50px -18px rgba(0, 0, 0, .9); }
.dv.phone img { border-radius: 13% / 6%; }
.dv.phone::before { content: ""; position: absolute; top: 2.4%; left: 50%; width: 30%; height: 3%; transform: translateX(-50%); border-radius: 99px; background: #000; z-index: 2; }
.dv.phone::after { content: ""; position: absolute; right: -3.5px; top: 24%; width: 2px; height: 11%; border-radius: 0 2px 2px 0; background: #4d5351; }

.devices figcaption { margin: 18px auto 0; max-width: 520px; text-align: center; font-size: 13.5px; line-height: 1.6; color: var(--muted); }
.stores { display: flex; justify-content: center; flex-wrap: wrap; gap: 12px; margin-top: 16px; }
.store { display: inline-flex; align-items: center; gap: 10px; padding: 8px 16px 8px 12px; border: 1px solid #3a3f3d; border-radius: 12px; background: linear-gradient(150deg, #1c201f, #0b0d0c); color: #fff; font-size: 15px; font-weight: 600; line-height: 1.15; }
.store svg { width: 24px; height: 24px; color: var(--neon); flex: none; }
.store small { display: block; font-size: 10.5px; font-weight: 400; letter-spacing: .04em; color: var(--muted); }


/* Ajustes de la revision: el boton flotante no tapa el pie y los links se tocan comodo en celular */
.foot-bottom { padding-right: 70px; }
@media (max-width: 860px) {
  .foot-col a { padding: 6px 0; margin: 0; }
  .contact-list a { display: inline-block; padding: 6px 0; }
}

/* La etiqueta NYSE: TGS es un link a la cotizacion */
a.fact-badge { text-decoration: none; z-index: 1; transition: border-color .2s, color .2s, background .2s; }
a.fact-badge:hover { border-color: var(--neon); color: var(--neon); background: rgba(95, 185, 165, .08); }

/* ---------- Ficha ampliada de cada proyecto ---------- */
.project { cursor: pointer; display: flex; flex-direction: column; }
.project .body { flex: 1; padding-bottom: 16px; }
.project .pic img { transition: transform .6s var(--ease); }
.project:hover .pic img, .project:focus-visible .pic img { transform: scale(1.03); }
.project:focus-visible { outline: 2px solid var(--neon); outline-offset: 3px; }
.see-more { margin: 0; padding: 0 24px 22px; font-size: 14px; font-weight: 500; color: var(--neon); }
.see-more span { display: inline-block; transition: transform .3s var(--ease); }
.project:hover .see-more span { transform: translateX(4px); }

.pdlg { width: min(1120px, calc(100% - 32px)); max-height: calc(100dvh - 32px); padding: 0; border: 1px solid transparent; border-radius: 20px; color: var(--text, #fff); overflow: auto;
  background: linear-gradient(160deg, #0d1513, #070909 60%) padding-box, linear-gradient(140deg, rgba(169, 220, 207, .5), rgba(56, 145, 127, .12) 45%, rgba(42, 111, 127, .45)) border-box; box-shadow: 0 40px 120px -20px rgba(0, 0, 0, .9); }
.pdlg::backdrop { background: rgba(0, 0, 0, .72); backdrop-filter: blur(6px); }
.pdlg[open] { animation: pdlg-in .35s var(--ease); }
@keyframes pdlg-in { from { opacity: 0; transform: translateY(18px) scale(.98); } }
.pdlg-close { position: sticky; float: right; top: 12px; margin: 12px 12px -56px 0; z-index: 2; width: 44px; height: 44px; border-radius: 50%; border: 1px solid rgba(255, 255, 255, .18); background: rgba(0, 0, 0, .6); color: #fff; font-size: 26px; line-height: 1; cursor: pointer; }
.pdlg-close:hover { border-color: var(--neon); color: var(--neon); }
.pdlg-pic { display: block; background: #050505; border-bottom: 1px solid var(--line) }
.pdlg-pic img { display: block; width: 100%; height: auto; }
.pdlg-pic img[hidden] { display: none; }
.pdlg-demo { position: relative; width: 100%; overflow: hidden; }
.pdlg-demo iframe { position: absolute; left: 0; top: 0; width: 1024px; height: 512px; border: 0; transform-origin: 0 0; background: #fff; }
.pdlg-hint { margin: 0; padding: 0 72px 0 18px; height: 68px; display: flex; align-items: center; font-size: 14px; color: var(--muted); border-bottom: 1px solid var(--line); }
.pdlg-hint::before { content: ""; display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--neon); margin-right: 8px; vertical-align: 1px; box-shadow: 0 0 8px var(--neon); }
.pdlg-body { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 40px; padding: 30px 36px 36px; }
.pdlg .kind { margin: 0 0 4px; color: var(--green); font-size: 15px; }
.pdlg h3 { margin: 0 0 14px; font-size: 26px; font-weight: 600; }
.pdlg-desc p { margin: 0 0 12px; font-size: 16px; line-height: 1.7; color: var(--muted); }
.pdlg-side h4 { margin: 6px 0 12px; font-size: 13px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--neon); }
.pdlg-side ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.pdlg-side li { padding: 9px 14px; border: 1px solid var(--line); border-radius: 10px; font-size: 14.5px; background: rgba(255, 255, 255, .02); }
body.pdlg-open { overflow: hidden; }
@media (max-width: 760px) {
  .pdlg-body { grid-template-columns: minmax(0, 1fr); gap: 22px; padding: 22px 20px 26px; }
  .pdlg h3 { font-size: 22px; }
  .pdlg-desc p { font-size: 15px; }
}
.ai-shot.mail .over { width: 27%; }

/* Plataformas interactivas: cada boton resalta su dispositivo */
button.plat { font: inherit; color: inherit; text-align: left; background: none; border: 1px solid transparent; cursor: pointer; width: calc(100% + 20px); }
button.plat[aria-pressed="true"] { border-color: rgba(95, 185, 165, .5); background: rgba(95, 185, 165, .07); }
button.plat[aria-pressed="true"] svg { color: var(--neon); }
.dv { transition: opacity .45s var(--ease), transform .45s var(--ease), filter .45s; }
.devices-stage[class*="f-"] .dv { opacity: .22; filter: grayscale(.8); }
.devices-stage.f-web .laptop, .devices-stage.f-desk .laptop { opacity: 1; filter: none; }
.devices-stage.f-phone .phone { opacity: 1; filter: none; transform: scale(1.12); z-index: 2; }
.devices-stage.f-tablet .tablet { opacity: 1; filter: none; transform: scale(1.1); z-index: 2; }
.dv.laptop .scr img { aspect-ratio: 16 / 10; object-fit: cover; object-position: left top; }
#dev-cap { transition: opacity .25s; min-height: 4.8em; }
#dev-cap.swap { opacity: 0; }
button.store { font-family: inherit; cursor: pointer; text-align: left; transition: border-color .25s, box-shadow .25s; }
button.store:hover, button.store[aria-expanded="true"] { border-color: var(--neon); box-shadow: 0 0 22px -6px rgba(95, 185, 165, .6); }
.store-steps { max-width: 520px; margin: 16px auto 0; padding: 16px 18px; border: 1px solid var(--line); border-radius: 14px; background: rgba(255, 255, 255, .02); animation: aipanel .35s var(--ease); }
.store-steps h4 { margin: 0 0 12px; font-size: 14px; font-weight: 600; }
.store-steps ol { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.store-steps li { display: grid; grid-template-columns: 26px 1fr; gap: 10px; align-items: start; font-size: 13.5px; color: var(--muted); opacity: .35; transition: opacity .4s; }
.store-steps li.on { opacity: 1; }
.store-steps li i { width: 26px; height: 26px; border-radius: 50%; border: 1px solid #3a3f3d; display: grid; place-items: center; font-style: normal; font-size: 12px; font-weight: 600; color: var(--text); transition: background .4s, border-color .4s, color .4s; }
.store-steps li.on i { background: var(--neon); border-color: var(--neon); color: #000; }
.store-steps li b { display: block; color: var(--text); font-weight: 600; font-size: 14px; }
.devices-stage.f-web .tablet, .devices-stage.f-web .phone, .devices-stage.f-desk .tablet, .devices-stage.f-desk .phone { opacity: 0; }

/* Agentes: icono de su tarea en lugar de un retrato */
.agent-ic { display: grid; place-items: center; width: 52px; height: 52px; margin: 0 auto 8px; border-radius: 14px; color: var(--c); background: color-mix(in srgb, var(--c) 12%, transparent); border: 1px solid color-mix(in srgb, var(--c) 40%, transparent); }
.agent-ic svg { width: 24px; height: 24px; }
/* Cifras: las filas de las cuatro tarjetas quedan alineadas entre si (logo, numero, frase, texto) */
@supports (grid-template-rows: subgrid) {
  .fact { display: grid; grid-row: span 4; grid-template-rows: subgrid; row-gap: 0; align-content: start; }
  .fact-unit { align-self: start; }
}
/* Agentes como contactos: inicial, nombre y tarea */
.ai-text .agents { display: flex; flex-wrap: wrap; gap: 8px; margin: 18px 0 16px; }
.ai-text .agent { display: inline-flex; align-items: center; gap: 8px; padding: 5px 12px 5px 5px; border: 1px solid var(--line); border-radius: 999px; font-size: 13.5px; color: var(--muted); background: rgba(255, 255, 255, .02); text-align: left; }
.ai-text .agent i { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; font-style: normal; font-size: 12px; font-weight: 600; color: #fff; background: var(--c); }
.ai-text .agent b { color: var(--text); font-weight: 600; font-size: 13.5px; display: inline; }
/* Dispositivos con mas detalle: canto metalico, camaras, botones y brillo de vidrio */
