/* =============================================================
   MOSS SYSTEMS — styles.css
   Arquetipo: Mouse-Reactive Gradient (oscuro + neón verde)
   ============================================================= */

/* 1. Tokens ---------------------------------------------------- */
:root {
  --bg: #08080c;
  --bg-2: #0e0f16;
  --ink: #F4F7FA;
  --mute: #9aa6b4;
  --line: rgba(255, 255, 255, 0.10);
  --line-2: rgba(255, 255, 255, 0.06);

  --lime: #BEF264;
  --emerald: #34D399;
  --green: #22C55E;
  --forest: #166534;
  --grad: linear-gradient(100deg, #BEF264, #34D399);

  --glass: rgba(255, 255, 255, 0.04);
  --glass-line: rgba(255, 255, 255, 0.12);

  --display: "Space Grotesk", system-ui, sans-serif;
  --sans: "Inter", system-ui, sans-serif;
  --mono: "Space Mono", ui-monospace, monospace;

  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-soft: cubic-bezier(0.25, 0.46, 0.45, 0.94);

  --gutter: clamp(1.2rem, 5vw, 5rem);
  --maxw: 1280px;

  --mx: 50%;
  --my: 30%;
}

/* 2. Reset & base --------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
  overscroll-behavior-y: none;
}
img, svg { display: block; max-width: 100%; }
button { font: inherit; color: inherit; cursor: pointer; border: 0; background: none; }
a { color: inherit; text-decoration: none; }
p { text-wrap: pretty; }
h1, h2, h3 { text-wrap: balance; line-height: 1.03; letter-spacing: -0.02em; font-family: var(--display); font-weight: 700; }
::selection { background: var(--lime); color: #04120a; }
:focus-visible { outline: 2px solid var(--lime); outline-offset: 3px; border-radius: 4px; }

.skip-link { position: fixed; top: -100px; left: 1rem; padding: .6rem 1rem; background: var(--lime); color: #04120a; z-index: 9999; border-radius: 8px; font-weight: 600; }
.skip-link:focus { top: 1rem; }

.grad {
  background: var(--grad);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: transparent;
}

/* 3. Splash ---------------------------------------------------- */
.splash {
  position: fixed; inset: 0; z-index: 10000;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1.6rem;
  background: var(--bg);
  animation: splashOut .8s var(--ease-out) 2.6s forwards; /* red de seguridad CSS */
}
.splash.hide { animation: splashOut .7s var(--ease-out) forwards; }
@keyframes splashOut { to { opacity: 0; visibility: hidden; } }
.splash-word { display: flex; gap: .05em; font-family: var(--display); font-weight: 700; font-size: clamp(1.6rem, 7vw, 3.4rem); letter-spacing: .12em; }
.splash-word span { display: inline-block; opacity: 0; transform: translateY(40%); animation: splashIn .6s var(--ease-out) forwards; }
.splash-word .splash-gap { width: .5em; animation: none; }
.splash-word span:nth-child(1){animation-delay:.05s} .splash-word span:nth-child(2){animation-delay:.10s}
.splash-word span:nth-child(3){animation-delay:.15s} .splash-word span:nth-child(4){animation-delay:.20s}
.splash-word span:nth-child(6){animation-delay:.28s} .splash-word span:nth-child(7){animation-delay:.33s}
.splash-word span:nth-child(8){animation-delay:.38s} .splash-word span:nth-child(9){animation-delay:.43s}
.splash-word span:nth-child(10){animation-delay:.48s} .splash-word span:nth-child(11){animation-delay:.53s}
.splash-word span:nth-child(12){animation-delay:.58s}
@keyframes splashIn { to { opacity: 1; transform: none; } }
.splash-bar { width: min(220px, 50vw); height: 2px; background: var(--line); overflow: hidden; border-radius: 2px; }
.splash-bar i { display: block; height: 100%; width: 0; background: var(--grad); animation: splashBar 2.3s var(--ease-soft) forwards; }
@keyframes splashBar { to { width: 100%; } }

/* 4. Fondo aurora + grano ------------------------------------- */
.aurora {
  position: fixed; inset: 0; z-index: -2; pointer-events: none;
  background:
    radial-gradient(circle 60vw at var(--mx) var(--my), rgba(34,197,94,0.22), transparent 60%),
    radial-gradient(circle 50vw at calc(var(--mx) + 18%) calc(var(--my) + 22%), rgba(190,242,100,0.10), transparent 55%),
    radial-gradient(circle 55vw at calc(var(--mx) - 20%) calc(var(--my) + 35%), rgba(22,101,52,0.30), transparent 60%),
    var(--bg);
  transition: background .5s var(--ease-soft);
}
.grain {
  position: fixed; inset: 0; z-index: -1; pointer-events: none; opacity: .08; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.72' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* 5. Cursor ---------------------------------------------------- */
.cursor { position: fixed; top: 0; left: 0; width: 30px; height: 30px; border: 1.5px solid rgba(190,242,100,.7); border-radius: 50%; transform: translate(-50%,-50%); pointer-events: none; z-index: 9000; transition: width .25s var(--ease-out), height .25s var(--ease-out), background .25s, border-color .25s; display: none; }
.cursor.on { display: block; }
.cursor.hover { width: 64px; height: 64px; background: rgba(190,242,100,.10); border-color: rgba(190,242,100,.9); }
.cursor-label { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-family: var(--mono); font-size: 9px; text-transform: uppercase; letter-spacing: .08em; color: var(--lime); opacity: 0; transition: opacity .2s; }
.cursor.hover .cursor-label { opacity: 1; }
@media (hover: none) { .cursor { display: none !important; } }

/* 6. Rail lateral --------------------------------------------- */
.rail { position: fixed; right: 18px; top: 50%; transform: translateY(-50%) rotate(180deg); writing-mode: vertical-rl; font-family: var(--mono); font-size: 10px; letter-spacing: .22em; color: var(--mute); z-index: 50; display: flex; align-items: center; gap: 10px; }
.rail-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--lime); box-shadow: 0 0 10px var(--lime); animation: pulse 2.4s ease-in-out infinite; }
@keyframes pulse { 0%,100%{opacity:.4} 50%{opacity:1} }
@media (max-width: 1280px){ .rail { display:none; } }

/* 7. Nav ------------------------------------------------------- */
.nav { position: fixed; top: 0; left: 0; right: 0; z-index: 100; display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 1rem var(--gutter); transition: background .4s, border-color .4s, padding .4s; border-bottom: 1px solid transparent; }
.nav.scrolled { background: rgba(8,8,12,.72); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-bottom-color: var(--line); padding-top: .7rem; padding-bottom: .7rem; }
.brand { display: flex; align-items: center; gap: .6rem; }
.brand-chip { width: 30px; height: 30px; }
.brand-name { font-family: var(--display); font-weight: 700; letter-spacing: .14em; font-size: 1rem; background: var(--grad); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.nav-links { display: flex; gap: 1.8rem; }
.nav-links a { font-size: .9rem; color: var(--mute); transition: color .3s; display: flex; align-items: baseline; gap: .35rem; }
.nav-links a i { font-family: var(--mono); font-size: .62rem; color: var(--lime); font-style: normal; }
.nav-links a:hover { color: var(--ink); }
.nav-cta { font-family: var(--display); font-weight: 600; font-size: .9rem; padding: .6rem 1.2rem; border-radius: 100px; color: #04120a; background: var(--grad); transition: transform .3s var(--ease-out), box-shadow .3s; }
.nav-cta:hover { transform: translateY(-2px); box-shadow: 0 8px 30px rgba(52,211,153,.35); }
.burger { display: none; flex-direction: column; gap: 5px; padding: 8px; }
.burger span { width: 22px; height: 2px; background: var(--ink); transition: transform .3s var(--ease-out), opacity .3s; }
.burger.open span:nth-child(1){ transform: translateY(7px) rotate(45deg); }
.burger.open span:nth-child(2){ transform: translateY(-0px) rotate(-45deg); }

/* 8. Buttons --------------------------------------------------- */
.btn { display: inline-flex; align-items: center; gap: .5rem; font-family: var(--display); font-weight: 600; font-size: 1rem; padding: .95rem 1.6rem; border-radius: 100px; transition: transform .3s var(--ease-out), box-shadow .3s, background .3s, color .3s; }
.btn-primary { color: #04120a; background: var(--grad); box-shadow: 0 8px 30px rgba(52,211,153,.2); }
.btn-primary:hover { transform: translateY(-3px); box-shadow: 0 14px 44px rgba(52,211,153,.45); }
.btn-arrow { transition: transform .3s var(--ease-out); }
.btn-primary:hover .btn-arrow { transform: translateX(5px); }
.btn-ghost { color: var(--ink); border: 1px solid var(--line); }
.btn-ghost:hover { border-color: var(--lime); color: var(--lime); transform: translateY(-3px); }

/* 9. Hero ------------------------------------------------------ */
.hero { min-height: 100svh; display: flex; flex-direction: column; justify-content: center; padding: 8rem var(--gutter) 4rem; max-width: var(--maxw); margin: 0 auto; }
.hero-kicker { font-family: var(--mono); font-size: .8rem; letter-spacing: .2em; text-transform: uppercase; color: var(--lime); margin-bottom: 1.5rem; }
.hero-title { font-size: clamp(2.6rem, 9vw, 6.6rem); font-weight: 700; }
.hero-title .line-2 { color: var(--mute); }
.hero-grad { font-family: var(--display); font-weight: 700; font-size: clamp(1.6rem, 5vw, 3.4rem); letter-spacing: -0.02em; line-height: 1.05; margin-top: .6rem; }
.hero-sub { max-width: 60ch; color: var(--mute); font-size: clamp(1rem, 2vw, 1.2rem); margin-top: 1.8rem; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 1rem; margin-top: 2.4rem; }
.hero-note { font-family: var(--mono); font-size: .78rem; color: var(--mute); margin-top: 1.4rem; letter-spacing: .04em; }

/* 10. Marquee -------------------------------------------------- */
.marquee { overflow: hidden; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 1.1rem 0; background: rgba(255,255,255,.02); }
.marquee-track { display: flex; align-items: center; gap: 1.4rem; white-space: nowrap; width: max-content; animation: marquee 32s linear infinite; font-family: var(--display); font-weight: 600; font-size: clamp(1.1rem, 2.5vw, 1.7rem); }
.marquee-track .dot { color: var(--lime); }
@keyframes marquee { to { transform: translateX(-50%); } }

/* 11. Manifesto ----------------------------------------------- */
.manifesto { max-width: 780px; margin: clamp(4.5rem, 10vw, 8rem) auto; padding: 0 var(--gutter); text-align: center; }
.manifesto p { font-family: var(--display); font-weight: 500; font-size: clamp(1.5rem, 4.2vw, 2.7rem); line-height: 1.2; margin: 0 auto; }
.manifesto em { font-style: italic; color: var(--lime); }

/* 12. Sections (genérico) ------------------------------------- */
.section { max-width: var(--maxw); margin: 0 auto; padding: clamp(4rem, 9vw, 8rem) var(--gutter); }
.section-head { margin-bottom: clamp(2.5rem, 6vw, 4.5rem); }
.section-num { font-family: var(--mono); font-size: .8rem; letter-spacing: .2em; color: var(--lime); display: block; margin-bottom: 1rem; }
.section-num.small { display: inline-block; padding: .3rem .8rem; border: 1px solid var(--line); border-radius: 100px; margin-bottom: 1.4rem; }
.section-head h2, .bono h2, .garantia h2 { font-size: clamp(2rem, 6vw, 4rem); }
.section-lead { color: var(--mute); max-width: 52ch; margin-top: 1rem; font-size: 1.05rem; }

/* glass genérico */
.glass { background: var(--glass); backdrop-filter: blur(16px) saturate(1.3); -webkit-backdrop-filter: blur(16px) saturate(1.3); border: 1px solid var(--glass-line); border-radius: 26px; }

/* 13. Servicios ----------------------------------------------- */
.services-grid { display: grid; grid-template-columns: 1fr; gap: 1.6rem; }
.service-card { position: relative; overflow: hidden; padding: clamp(2rem, 4vw, 3rem); display: flex; flex-direction: column; }
.service-card::before { content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; opacity: 0; transition: opacity .5s var(--ease-out); background: radial-gradient(circle 320px at var(--cx,50%) var(--cy,50%), rgba(190,242,100,.14), transparent 60%); }
.service-card:hover::before { opacity: 1; }
.service-card:hover { border-color: rgba(190,242,100,.35); }
.service-ico { width: 58px; height: 58px; border-radius: 16px; display: grid; place-items: center; background: rgba(52,211,153,.10); border: 1px solid rgba(52,211,153,.2); margin-bottom: 1.6rem; }
.service-ico svg { width: 28px; height: 28px; stroke: var(--lime); }
.service-card h3 { font-size: clamp(1.4rem, 3vw, 1.9rem); margin-bottom: .5rem; }
.service-sub { color: var(--mute); margin-bottom: 1.6rem; }
.service-feats { list-style: none; display: flex; flex-direction: column; gap: .9rem; margin-bottom: 2rem; flex-grow: 1; }
.service-feats li { display: flex; gap: .7rem; align-items: flex-start; color: #cdd4de; }
.service-feats svg { width: 20px; height: 20px; flex-shrink: 0; stroke: var(--emerald); margin-top: 2px; }
.service-card .btn { align-self: flex-start; }

/* 14. Resultados (stats) -------------------------------------- */
.stats-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.2rem; }
.stat { padding: clamp(1.6rem, 3.5vw, 2.6rem) 1.4rem; text-align: center; }
.stat-num { font-family: var(--display); font-weight: 700; font-size: clamp(2.6rem, 8vw, 4.4rem); line-height: 1; background: var(--grad); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.stat-label { color: var(--ink); font-weight: 600; margin-top: .8rem; }
.stat-sub { color: var(--mute); font-size: .9rem; margin-top: .4rem; }
.stats-foot { color: var(--mute); font-size: .82rem; text-align: center; margin-top: 1.8rem; max-width: 60ch; margin-left: auto; margin-right: auto; }

/* 15. Proceso -------------------------------------------------- */
.steps-grid { display: grid; grid-template-columns: 1fr; gap: 1.2rem; }
.step { padding: clamp(1.8rem,3.5vw,2.6rem); display: flex; gap: 1.4rem; align-items: flex-start; border-bottom: 1px solid var(--line); }
.step-n { font-family: var(--mono); font-size: 1.1rem; color: var(--lime); flex-shrink: 0; }
.step h3 { font-size: clamp(1.3rem,3vw,1.8rem); margin-bottom: .4rem; }
.step p { color: var(--mute); }

/* 16. Bono / Garantía ----------------------------------------- */
.bono-card, .garantia-card { padding: clamp(2.2rem, 5vw, 4rem); text-align: center; max-width: 820px; margin: 0 auto; }
.bono-card p, .garantia-card p { color: var(--mute); max-width: 54ch; margin: 1.2rem auto 2rem; font-size: 1.08rem; }
.garantia-badges { display: flex; flex-wrap: wrap; gap: .7rem; justify-content: center; }
.pill { font-family: var(--mono); font-size: .8rem; padding: .5rem 1rem; border: 1px solid rgba(190,242,100,.35); border-radius: 100px; color: var(--lime); }

/* 17. FAQ ------------------------------------------------------ */
.faq-list { display: flex; flex-direction: column; gap: 1rem; max-width: 800px; margin: 0 auto; }
.faq-item { border: 1px solid var(--line); border-radius: 18px; overflow: hidden; background: rgba(255,255,255,.02); }
.faq-q { width: 100%; display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding: 1.3rem 1.6rem; font-family: var(--display); font-weight: 600; font-size: 1.1rem; text-align: left; }
.faq-q .plus { color: var(--lime); transition: transform .3s var(--ease-out); flex-shrink: 0; font-size: 1.4rem; }
.faq-item.open .plus { transform: rotate(45deg); }
.faq-a { max-height: 0; overflow: hidden; transition: max-height .4s var(--ease-out); }
.faq-a p { color: var(--mute); padding: 0 1.6rem 1.4rem; }

/* 18. Contacto ------------------------------------------------- */
.contacto { text-align: center; }
.contacto-kicker { font-family: var(--mono); font-size: .85rem; letter-spacing: .2em; text-transform: uppercase; color: var(--lime); margin-bottom: 1.4rem; }
.contacto-big { display: inline-block; font-family: var(--display); font-weight: 700; font-size: clamp(2rem, 8vw, 5.4rem); line-height: 1.05; letter-spacing: -0.02em; background: var(--grad); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; position: relative; }
.contacto-big::after { content: ""; position: absolute; left: 0; bottom: -.1em; width: 0; height: 3px; background: var(--grad); transition: width .5s var(--ease-out); }
.contacto-big:hover::after { width: 100%; }
.contacto-meta { display: flex; flex-wrap: wrap; gap: 2rem; justify-content: center; margin-top: 2.4rem; }
.contacto-meta a { color: var(--mute); font-size: 1rem; transition: color .3s; }
.contacto-meta a b { color: var(--ink); }
.contacto-meta a:hover { color: var(--lime); }

/* 19. Footer --------------------------------------------------- */
.footer { border-top: 1px solid var(--line); margin-top: 4rem; overflow: hidden; }
.footer-big { display: flex; white-space: nowrap; font-family: var(--display); font-weight: 700; font-size: clamp(2.4rem, 9vw, 6rem); color: rgba(255,255,255,.04); padding: 1.5rem 0; user-select: none; }
.footer-big span { animation: marquee 40s linear infinite; }
.footer-grid { max-width: var(--maxw); margin: 0 auto; padding: 2rem var(--gutter); display: grid; grid-template-columns: 1fr; gap: 2rem; }
.footer-grid h4 { font-family: var(--mono); font-size: .8rem; letter-spacing: .12em; text-transform: uppercase; color: var(--lime); margin-bottom: .8rem; }
.footer-grid p { color: var(--mute); margin-bottom: .4rem; }
.footer-grid a:hover { color: var(--lime); }
.footer-legal { max-width: var(--maxw); margin: 0 auto; padding: 1.6rem var(--gutter) 2.4rem; display: flex; flex-wrap: wrap; gap: 1rem; justify-content: space-between; border-top: 1px solid var(--line-2); color: var(--mute); font-size: .85rem; font-family: var(--mono); }
.footer-legal a:hover { color: var(--lime); }

/* 20. Reveals (robusto: visible sin JS) ----------------------- */
.reveal { opacity: 1; transform: none; }
html.is-ready .reveal:not(.in) { opacity: 0; transform: translateY(28px); }
.reveal.in { opacity: 1; transform: none; transition: opacity .9s var(--ease-out), transform .9s var(--ease-out); }
/* red de seguridad para split text */
.reveal[data-split] { opacity: 1; transform: none; }
html.is-ready .reveal[data-split]:not(.in) { opacity: 0; transform: translateY(28px); }

/* 21. Responsive ---------------------------------------------- */
@media (min-width: 720px) {
  .services-grid { grid-template-columns: repeat(2, 1fr); }
  .steps-grid { grid-template-columns: repeat(3, 1fr); }
  .step { border-bottom: none; border-left: 1px solid var(--line); }
}
@media (min-width: 960px) {
  .stats-grid { grid-template-columns: repeat(4, 1fr); }
  .footer-grid { grid-template-columns: 1.4fr 1fr 1fr; }
}
@media (max-width: 860px) {
  .nav-links { position: fixed; inset: 0 0 0 auto; width: min(80vw, 340px); flex-direction: column; justify-content: center; gap: 2rem; padding: var(--gutter); background: rgba(8,8,12,.96); backdrop-filter: blur(20px); transform: translateX(100%); transition: transform .4s var(--ease-out); }
  .nav-links.open { transform: none; }
  .nav-links a { font-size: 1.4rem; }
  .burger { display: flex; }
  .nav-cta { display: none; }
}

/* 22. Reduced-motion: SOLO efectos intrusivos ----------------- */
@media (prefers-reduced-motion: reduce) {
  .rail-dot { animation: none; }
  .aurora { transition: none; }
  /* No desactivamos reveals, hovers ni marquees suaves (Windows trae esto ON). */
}
