/* ============ Astrotek — 2026 ============ */
:root {
  --bg: #0a0b0d;
  --bg-2: #111316;
  --surface: #15171b;
  --line: rgba(255, 255, 255, .08);
  --line-2: rgba(255, 255, 255, .14);
  --text: #ecedee;
  --muted: #8b8f96;
  --dim: #5b5f66;
  --accent: #9ef07a;          /* evolución del verde Astrotek original (#7cc576) */
  --accent-ink: #0b1a05;
  --radius: 22px;
  --pad: clamp(20px, 5vw, 72px);
  --max: 1280px;
  --ease: cubic-bezier(.2, .7, .1, 1);
  --sans: "Geist", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "Geist Mono", ui-monospace, "SFMono-Regular", Consolas, monospace;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
h1, h2, h3, h4, h5 { margin: 0; font-weight: 500; letter-spacing: -.03em; line-height: 1.02; }
p { margin: 0; }
::selection { background: var(--accent); color: var(--accent-ink); }

/* grano sutil */
body::after {
  content: ""; position: fixed; inset: 0; pointer-events: none; z-index: 100; opacity: .05;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

.label {
  font-family: var(--mono); font-size: 12.5px; letter-spacing: .08em; text-transform: uppercase;
  color: var(--muted); margin-bottom: 28px;
}
.muted { color: var(--dim); }
.mono { font-family: var(--mono); font-size: 13px; }

/* ---------- Botones ---------- */
.btn {
  display: inline-flex; align-items: center; gap: .5em; justify-content: center;
  height: 50px; padding: 0 24px; border-radius: 999px; font-weight: 500; font-size: 15.5px;
  transition: background .3s var(--ease), color .3s, border-color .3s, transform .3s var(--ease);
  will-change: transform; white-space: nowrap;
}
.btn-primary { background: var(--accent); color: var(--accent-ink); }
.btn-primary:hover { background: #fff; }
.btn-ghost { border: 1px solid var(--line-2); color: var(--text); }
.btn-ghost:hover { border-color: var(--text); }
.btn-pill { height: 40px; padding: 0 18px; font-size: 14px; background: var(--text); color: var(--bg); }
.btn-pill:hover { background: var(--accent); }
.btn-lg { height: 60px; padding: 0 32px; font-size: 17px; }

/* ---------- Nav ---------- */
.nav {
  position: fixed; top: 14px; left: 50%; translate: -50% 0; z-index: 50;
  width: min(calc(100% - 28px), var(--max));
  display: flex; align-items: center; justify-content: space-between; gap: 20px;
  padding: 10px 10px 10px 18px; border-radius: 999px;
  border: 1px solid transparent;
  transition: background .4s, border-color .4s, backdrop-filter .4s;
}
.nav.scrolled { background: rgba(14, 15, 18, .7); border-color: var(--line); backdrop-filter: blur(14px) saturate(140%); -webkit-backdrop-filter: blur(14px) saturate(140%); }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 600; letter-spacing: -.02em; font-size: 19px; }
.brand-mark { width: 28px; height: 32px; display: block; transition: transform .8s var(--ease); }
.brand:hover .brand-mark { transform: rotate(60deg); }
.nav-links { display: flex; gap: 30px; font-size: 14.5px; color: var(--muted); }
.nav-links a { transition: color .25s; }
.nav-links a:hover { color: var(--text); }

/* ---------- Hero ---------- */
.hero {
  position: relative; min-height: 100svh; display: flex; align-items: center;
  padding: 120px var(--pad) 80px; overflow: hidden;
}
.hero::before { /* halo */
  content: ""; position: absolute; width: 900px; height: 900px; right: -200px; top: 50%; translate: 0 -50%;
  background: radial-gradient(circle, rgba(158, 240, 122, .10), transparent 60%); pointer-events: none;
}
#cube { position: absolute; inset: 0; width: 100%; height: 100%; }
.hero-inner { position: relative; z-index: 2; max-width: var(--max); width: 100%; margin: 0 auto; pointer-events: none; }
.hero-inner > * { pointer-events: auto; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 10px; font-family: var(--mono); font-size: 12.5px;
  color: var(--muted); padding: 8px 14px; border: 1px solid var(--line); border-radius: 999px;
  background: rgba(10, 11, 13, .5); backdrop-filter: blur(6px); margin-bottom: 34px;
}
.dot { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 0 rgba(158, 240, 122, .6); animation: ping 2.2s infinite; }
@keyframes ping { 0% { box-shadow: 0 0 0 0 rgba(158,240,122,.55) } 70%,100% { box-shadow: 0 0 0 10px rgba(158,240,122,0) } }
.hero-title { font-size: clamp(46px, 8.4vw, 128px); max-width: 11ch; font-weight: 500; }
.hero-title em, .cta-title em { font-style: normal; color: var(--accent); }
.hero-sub { max-width: 46ch; margin-top: 30px; color: var(--muted); font-size: clamp(16px, 1.4vw, 19px); }
.hero-cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 40px; }
.scroll-hint { position: absolute; bottom: 30px; left: 50%; translate: -50% 0; width: 22px; height: 36px; border: 1px solid var(--line-2); border-radius: 12px; z-index: 2; }
.scroll-hint span { position: absolute; left: 50%; top: 7px; width: 3px; height: 7px; margin-left: -1.5px; border-radius: 2px; background: var(--text); animation: wheel 1.8s var(--ease) infinite; }
@keyframes wheel { 0% { opacity: 0; transform: translateY(0) } 30% { opacity: 1 } 100% { opacity: 0; transform: translateY(12px) } }

/* split de palabras */
[data-split] .w { display: inline-block; overflow: hidden; vertical-align: top; padding-bottom: .08em; margin-bottom: -.08em; }
[data-split] .w > span { display: inline-block; transform: translateY(105%); transition: transform 1.1s var(--ease); transition-delay: calc(var(--i) * 70ms + .1s); }
[data-split].in .w > span { transform: none; }

/* ---------- Marquee ---------- */
.marquee { border-block: 1px solid var(--line); overflow: hidden; padding: 22px 0; background: var(--bg-2); }
.marquee-track { display: flex; gap: 34px; width: max-content; animation: marquee 42s linear infinite; font-size: clamp(18px, 2vw, 26px); letter-spacing: -.02em; color: var(--muted); }
.marquee-track i { font-style: normal; color: var(--accent); font-size: .7em; align-self: center; }
.marquee:hover .marquee-track { animation-play-state: paused; }
@keyframes marquee { to { transform: translateX(-50%) } }

/* ---------- Secciones ---------- */
section { padding: clamp(90px, 13vw, 170px) var(--pad); }
section > * { max-width: var(--max); margin-inline: auto; }
.section-head { margin-bottom: clamp(44px, 6vw, 80px); }
.section-head h2 { font-size: clamp(34px, 5.2vw, 72px); max-width: 17ch; }

/* manifiesto con scrub */
.manifesto-text { font-size: clamp(28px, 4.4vw, 62px); line-height: 1.12; letter-spacing: -.03em; font-weight: 500; }
.manifesto-text .w { color: var(--text); opacity: .14; transition: opacity .25s linear; }
.manifesto-text .w.on { opacity: 1; }

/* ---------- Bento ---------- */
.bento { display: grid; grid-template-columns: repeat(6, 1fr); gap: 14px; }
.card {
  --mx: 50%; --my: 50%;
  position: relative; overflow: hidden; border-radius: var(--radius);
  background: var(--surface); border: 1px solid var(--line);
  padding: 30px; min-height: 280px; display: flex; flex-direction: column; gap: 12px;
  isolation: isolate;
}
.card::before { /* spotlight */
  content: ""; position: absolute; inset: 0; z-index: -1; opacity: 0; transition: opacity .4s;
  background: radial-gradient(420px circle at var(--mx) var(--my), rgba(158, 240, 122, .09), transparent 60%);
}
.card::after { /* borde iluminado */
  content: ""; position: absolute; inset: 0; border-radius: inherit; padding: 1px; pointer-events: none; opacity: 0; transition: opacity .4s;
  background: radial-gradient(300px circle at var(--mx) var(--my), rgba(158, 240, 122, .55), transparent 60%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude;
}
.card:hover::before, .card:hover::after { opacity: 1; }
.card h3 { font-size: clamp(22px, 2vw, 28px); letter-spacing: -.025em; }
.card p { color: var(--muted); font-size: 15.5px; max-width: 42ch; }
.card-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: auto; padding-bottom: 28px; }
.num { font-family: var(--mono); font-size: 12px; color: var(--dim); margin-left: auto; }
.tag { font-family: var(--mono); font-size: 11.5px; text-transform: uppercase; letter-spacing: .06em; padding: 5px 10px; border-radius: 999px; background: rgba(158, 240, 122, .12); color: var(--accent); }

.card-ai { grid-column: span 4; grid-row: span 2; min-height: 520px; background: linear-gradient(160deg, #171a17 0%, var(--surface) 60%); }
.card-dev { grid-column: span 2; }
.card-erp { grid-column: span 2; }
.card-consult { grid-column: span 2; }
.card-infra { grid-column: span 2; }
.card-support { grid-column: span 2; }

.orbit { position: absolute; right: -60px; top: -60px; width: 440px; height: 440px; z-index: -1; pointer-events: none; }
.ring { position: absolute; inset: 0; margin: auto; border-radius: 50%; border: 1px dashed rgba(255, 255, 255, .09); animation: spin linear infinite; }
.ring.r1 { width: 160px; height: 160px; animation-duration: 14s; }
.ring.r2 { width: 290px; height: 290px; animation-duration: 26s; animation-direction: reverse; }
.ring.r3 { width: 420px; height: 420px; animation-duration: 40s; border-style: solid; border-color: rgba(255, 255, 255, .05); }
.ring i { position: absolute; top: -4px; left: 50%; width: 8px; height: 8px; margin-left: -4px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 14px var(--accent); }
.ring.r2 i:nth-child(2) { top: auto; bottom: -4px; background: #fff; box-shadow: 0 0 10px #fff; }
.ring.r3 i { width: 6px; height: 6px; background: #9aa0a8; box-shadow: none; }
.core { position: absolute; inset: 0; margin: auto; width: 74px; height: 74px; border-radius: 50%; display: grid; place-items: center; font-family: var(--mono); font-size: 15px; color: var(--accent-ink); background: var(--accent); box-shadow: 0 0 0 10px rgba(158, 240, 122, .08), 0 0 60px rgba(158, 240, 122, .45); }
@keyframes spin { to { transform: rotate(360deg) } }

.chat { margin-top: 30px; display: flex; flex-direction: column; gap: 10px; max-width: 520px; }
.msg { padding: 13px 17px; border-radius: 16px; font-size: 15px; line-height: 1.45; max-width: 88%; }
.msg-user { align-self: flex-end; background: #23262b; border-bottom-right-radius: 4px; }
.msg-bot { align-self: flex-start; background: rgba(158, 240, 122, .1); border: 1px solid rgba(158, 240, 122, .2); color: #d9f7cb; border-bottom-left-radius: 4px; min-height: 48px; min-width: 60px; }
.typing::after { content: "▍"; color: var(--accent); animation: blink 1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0 } }

.code { margin: 18px 0 0; padding: 16px 18px; border-radius: 14px; background: #0d0e10; border: 1px solid var(--line); font-family: var(--mono); font-size: 12.5px; line-height: 1.7; color: #c9ccd1; overflow: hidden; }
.code .c { color: var(--dim); } .code .k { color: var(--accent); } .code .s { color: #f3c77a; }

.bars { display: flex; align-items: flex-end; gap: 6px; height: 64px; margin-top: 18px; }
.bars i { flex: 1; border-radius: 4px 4px 0 0; background: linear-gradient(to top, rgba(158,240,122,.15), rgba(158,240,122,.6)); height: 20%; transition: height 1.2s var(--ease); }
.card.in .bars i:nth-child(1) { height: 35% } .card.in .bars i:nth-child(2) { height: 52%; transition-delay: .08s }
.card.in .bars i:nth-child(3) { height: 44%; transition-delay: .16s } .card.in .bars i:nth-child(4) { height: 68%; transition-delay: .24s }
.card.in .bars i:nth-child(5) { height: 60%; transition-delay: .32s } .card.in .bars i:nth-child(6) { height: 82%; transition-delay: .4s }
.card.in .bars i:nth-child(7) { height: 100%; transition-delay: .48s }

.net { width: 100%; height: auto; margin-top: 14px; }
.net .links path { fill: none; stroke: var(--line-2); stroke-width: 1.2; stroke-dasharray: 4 5; animation: dash 3s linear infinite; }
.net .nodes circle { fill: var(--surface); stroke: var(--accent); stroke-width: 1.5; animation: node 2.4s ease-in-out infinite; transform-box: fill-box; transform-origin: center; }
.net .nodes circle:nth-child(2) { animation-delay: .4s } .net .nodes circle:nth-child(3) { animation-delay: .8s }
.net .nodes circle:nth-child(4) { animation-delay: 1.2s } .net .nodes circle:nth-child(5) { animation-delay: 1.6s }
@keyframes dash { to { stroke-dashoffset: -18 } }
@keyframes node { 50% { fill: var(--accent); transform: scale(1.25) } }

.link-arrow { margin-top: auto; padding-top: 18px; font-size: 15px; color: var(--accent); display: inline-flex; gap: 6px; }
.link-arrow span { transition: transform .3s var(--ease); }
.link-arrow:hover span { transform: translateX(4px); }

/* ---------- Proceso ---------- */
.process { position: relative; }
.steps { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; counter-reset: s; }
.step { padding: 28px 26px 32px; border-top: 1px solid var(--line-2); }
.step-n { font-family: var(--mono); font-size: 12.5px; color: var(--accent); display: block; margin-bottom: 44px; }
.step h4 { font-size: 24px; margin-bottom: 12px; }
.step p { color: var(--muted); font-size: 15.5px; }
.progress-line { height: 1px; background: transparent; margin-top: -1px; }
.process .steps { position: relative; }
.process .steps::before { content: ""; position: absolute; left: 0; top: 0; height: 1px; width: calc(var(--p, 0) * 100%); background: var(--accent); box-shadow: 0 0 12px var(--accent); }

/* ---------- Por qué ---------- */
.why { padding-top: 0; }
.why-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.why-item { padding: 34px; border-radius: var(--radius); background: var(--bg-2); border: 1px solid var(--line); }
.why-item h5 { font-size: 21px; margin-bottom: 10px; letter-spacing: -.02em; }
.why-item p { color: var(--muted); font-size: 15.5px; }

/* ---------- CTA ---------- */
.cta { text-align: center; border-top: 1px solid var(--line); position: relative; overflow: hidden; }
.cta::before { content: ""; position: absolute; left: 50%; bottom: -380px; translate: -50% 0; width: 1100px; height: 700px; background: radial-gradient(ellipse, rgba(158, 240, 122, .16), transparent 62%); pointer-events: none; }
.cta > * { position: relative; }
.cta-title { font-size: clamp(50px, 15vw, 230px); letter-spacing: -.06em; line-height: .9; }
.cta-sub { color: var(--muted); margin-top: 26px; font-size: 19px; }
.cta-actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; margin-top: 44px; }
.socials { display: flex; gap: 18px; flex-wrap: wrap; }
.socials a { display: inline-flex; align-items: center; gap: 8px; transition: color .25s; }
.footer-social { display: flex; gap: 22px; }
.footer-social a:hover { color: var(--accent); }
.contact-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin: 90px auto 0; text-align: left; }
.contact-grid div { padding-top: 18px; border-top: 1px solid var(--line); }
.contact-grid dt { font-family: var(--mono); font-size: 12px; text-transform: uppercase; letter-spacing: .08em; color: var(--dim); margin-bottom: 6px; }
.contact-grid dd { margin: 0; font-size: 17px; }
.contact-grid a:hover { color: var(--accent); }

/* ---------- Footer ---------- */
.footer { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding: 28px calc(var(--pad) + 70px) 28px var(--pad); border-top: 1px solid var(--line); color: var(--dim); font-size: 14px; }

/* ---------- WhatsApp ---------- */
.wsp { position: fixed; right: 20px; bottom: 20px; z-index: 60; width: 56px; height: 56px; border-radius: 50%; display: grid; place-items: center; background: #25d366; color: #fff; box-shadow: 0 10px 30px rgba(0,0,0,.4); transition: transform .3s var(--ease); }
.wsp:hover { transform: scale(1.08); }

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

/* ---------- Responsive ---------- */
@media (max-width: 1000px) {
  .bento { grid-template-columns: repeat(2, 1fr); }
  .card-ai { grid-column: span 2; grid-row: auto; min-height: 0; }
  .card-dev, .card-erp, .card-consult, .card-infra, .card-support { grid-column: span 1; }
  .steps { grid-template-columns: repeat(2, 1fr); }
  .contact-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 720px) {
  .nav-links { display: none; }
  .nav { padding-left: 14px; }
  .hero { align-items: flex-end; padding-bottom: 48px; }
  .hide-sm, .scroll-hint { display: none; }
  .eyebrow { margin-bottom: 24px; }
  .bento, .steps, .why-grid, .contact-grid { grid-template-columns: 1fr; }
  .card-ai, .card-dev, .card-erp, .card-consult, .card-infra, .card-support { grid-column: auto; }
  .card { min-height: 0; padding: 24px; }
  .card-top { padding-bottom: 8px; }
  .orbit { position: relative; right: auto; top: auto; width: auto; height: 200px; margin: 0 -24px 8px; overflow: hidden; z-index: 0; }
  .ring.r1 { width: 110px; height: 110px; }
  .ring.r2 { width: 190px; height: 190px; }
  .ring.r3 { width: 290px; height: 290px; }
  .core { width: 60px; height: 60px; font-size: 13px; }
  .contact-grid { margin-top: 60px; }
  .process .steps::before { display: none; }
  .btn-lg { width: 100%; }
  .cta-actions .btn-ghost { font-size: 15px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  .reveal { opacity: 1; transform: none; }
  [data-split] .w > span { transform: none; }
  .manifesto-text .w { opacity: 1; }
}
