:root {
  --bg: #0a1020;
  --bg-alt: #0e1629;
  --surface: #131c33;
  --border: #22304f;
  --text: #e6ebf5;
  --muted: #9aa6bf;
  --accent: #22d3a6;
  --accent-2: #38bdf8;
  --warn: #f5b942;
  --crit: #f2545b;
  --radius: 14px;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: ui-monospace, "Cascadia Code", Consolas, monospace;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 80px; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}
img, svg { display: block; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { line-height: 1.2; margin: 0 0 .5em; letter-spacing: -0.02em; }
h1 { font-size: clamp(2.1rem, 4.5vw, 3.4rem); font-weight: 700; }
h2 { font-size: clamp(1.7rem, 3vw, 2.3rem); font-weight: 700; }
h3 { font-size: 1.15rem; font-weight: 600; }
p { margin: 0 0 1em; }

.container { width: min(1140px, 100% - 40px); margin-inline: auto; }
.container--narrow { width: min(760px, 100% - 40px); }

.eyebrow {
  font-family: var(--mono);
  font-size: .8rem;
  text-transform: uppercase;
  letter-spacing: .12em;
  color: var(--accent);
  margin-bottom: .8em;
}

/* Buttons */
.btn {
  display: inline-block;
  background: var(--accent);
  color: #04221a;
  font-weight: 600;
  padding: .85em 1.5em;
  border-radius: 10px;
  border: 1px solid var(--accent);
  cursor: pointer;
  font: inherit;
  font-weight: 600;
  transition: transform .15s, background .15s;
}
.btn:hover { text-decoration: none; background: #3be3b8; transform: translateY(-1px); }
.btn--ghost { background: transparent; color: var(--text); border-color: var(--border); }
.btn--ghost:hover { background: var(--surface); }
.btn--sm { padding: .5em 1.1em; font-size: .95rem; }
.btn--block { width: 100%; }
.btn:disabled { opacity: .6; cursor: wait; }

/* Nav */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: rgba(10, 16, 32, .85);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}
.nav__inner { display: flex; align-items: center; justify-content: space-between; height: 68px; }
.logo { display: flex; align-items: center; gap: .55em; color: var(--text); font-size: 1.25rem; letter-spacing: -0.01em; }
.logo:hover { text-decoration: none; }
.logo strong { color: var(--accent); font-weight: 700; }
.logo--sm { font-size: 1.05rem; }
.nav__menu { display: flex; align-items: center; gap: 1.8rem; }
.nav__menu a:not(.btn) { color: var(--muted); font-size: .95rem; font-weight: 500; }
.nav__menu a:not(.btn):hover { color: var(--text); text-decoration: none; }
.nav__toggle { display: none; background: none; border: 0; padding: 8px; cursor: pointer; }
.nav__toggle span { display: block; width: 22px; height: 2px; background: var(--text); margin: 5px 0; transition: .2s; }

/* Hero */
.hero {
  padding: 90px 0 100px;
  background:
    radial-gradient(800px 400px at 85% 10%, rgba(34, 211, 166, .12), transparent 60%),
    radial-gradient(600px 400px at 10% 90%, rgba(56, 189, 248, .08), transparent 60%);
}
.hero__grid { display: grid; grid-template-columns: 1.1fr .9fr; gap: 60px; align-items: center; }
.hl { color: var(--accent); }
.lead { font-size: 1.15rem; color: var(--muted); max-width: 36em; }
.hero__cta { display: flex; flex-wrap: wrap; gap: 12px; margin: 30px 0 28px; }
.hero__points { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 8px 24px; color: var(--muted); font-size: .95rem; }
.hero__points li::before { content: "✓"; color: var(--accent); margin-right: .45em; font-weight: 700; }

.console {
  background: #060b17;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: 0 30px 80px rgba(0, 0, 0, .45);
  overflow: hidden;
  font-family: var(--mono);
  font-size: .8rem;
}
.console__bar { display: flex; align-items: center; gap: 6px; padding: 12px 14px; border-bottom: 1px solid var(--border); }
.console__bar span { width: 10px; height: 10px; border-radius: 50%; background: var(--border); }
.console__bar em { margin-left: auto; color: var(--muted); font-style: normal; font-size: .75rem; }
.console__log { list-style: none; margin: 0; padding: 18px; display: grid; gap: 10px; }
.console__log li { display: flex; gap: 10px; color: #c6cfe2; opacity: 0; animation: fadeIn .4s forwards; }
.console__log li:nth-child(1) { animation-delay: .2s; }
.console__log li:nth-child(2) { animation-delay: .8s; }
.console__log li:nth-child(3) { animation-delay: 1.4s; }
.console__log li:nth-child(4) { animation-delay: 2s; }
.console__log li:nth-child(5) { animation-delay: 2.6s; }
.console__log li:nth-child(6) { animation-delay: 3.2s; }
.console__log time { color: #5d6a87; }
.console__log b { min-width: 3.4em; font-weight: 500; }
.ok { color: var(--accent); }
.warn { color: var(--warn); }
.crit { color: var(--crit); }
.cursor { animation: fadeIn .4s 3.2s forwards, blink 1s 3.6s steps(1) infinite !important; }
@keyframes fadeIn { to { opacity: 1; } }
@keyframes blink { 50% { opacity: 0; } }

/* Sections */
.section { padding: 100px 0; }
.section--alt { background: var(--bg-alt); border-block: 1px solid var(--border); }
.section__head { max-width: 680px; margin-bottom: 50px; }
.section__head p:last-child { color: var(--muted); font-size: 1.08rem; }

/* Cards */
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.card {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  transition: border-color .2s, transform .2s;
}
.card:hover { border-color: #33466f; transform: translateY(-2px); }
.card p { color: var(--muted); font-size: .97rem; margin: 0; }
.card--featured {
  grid-row: span 2;
  display: flex; flex-direction: column;
  background: linear-gradient(160deg, rgba(34, 211, 166, .14), var(--surface) 55%);
  border-color: rgba(34, 211, 166, .45);
}
.card--featured h3 { font-size: 1.45rem; }
.card--featured p { font-size: 1.03rem; }
.card__link { display: inline-block; margin-top: auto; padding-top: 18px; font-weight: 600; }
.card__link::after { content: ""; position: absolute; inset: 0; border-radius: var(--radius); }
.card__link:focus-visible { outline: none; }
.card:has(.card__link:focus-visible) { outline: 2px solid var(--accent); outline-offset: 2px; }
.card:has(.card__link:hover) { border-color: var(--accent); }
.card:not(.card--featured) { display: flex; flex-direction: column; }
.tag {
  position: absolute; top: 20px; right: 20px;
  font-family: var(--mono); font-size: .7rem; text-transform: uppercase; letter-spacing: .1em;
  color: var(--accent); border: 1px solid rgba(34, 211, 166, .5); border-radius: 99px; padding: 3px 10px;
}
.card__icon {
  width: 46px; height: 46px; border-radius: 12px;
  display: grid; place-items: center;
  background: rgba(34, 211, 166, .1);
  margin-bottom: 18px;
}
.card__icon svg { width: 24px; height: 24px; fill: none; stroke: var(--accent); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

/* Flow */
.flow { list-style: none; padding: 0; margin: 0 0 60px; display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; counter-reset: f; }
.flow li { position: relative; padding: 26px 24px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); }
.flow li:not(:last-child)::after {
  content: "→"; position: absolute; right: -17px; top: 50%; transform: translateY(-50%);
  color: var(--accent); font-size: 1.1rem; z-index: 1;
}
.flow__n { font-family: var(--mono); color: var(--accent); font-size: .85rem; display: block; margin-bottom: 10px; }
.flow p { color: var(--muted); font-size: .95rem; margin: 0; }

.split { display: grid; grid-template-columns: 1.2fr .8fr; gap: 50px; align-items: start; }
.checks { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; }
.checks li { padding-left: 32px; position: relative; color: #cfd6e6; }
.checks li::before {
  content: ""; position: absolute; left: 0; top: .35em; width: 18px; height: 18px; border-radius: 50%;
  background: rgba(34, 211, 166, .15) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2322d3a6' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m5 12 5 5 9-10'/%3E%3C/svg%3E") center / 11px no-repeat;
}
.stats { display: grid; gap: 14px; }
.stats div { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px 22px; display: flex; align-items: baseline; gap: 14px; }
.stats strong { font-size: 1.8rem; color: var(--accent); font-weight: 700; min-width: 4.2em; }
.stats span { color: var(--muted); }
.note { font-size: .8rem; color: #6b7894; margin: 0; }

/* Steps / values */
.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 30px; margin-bottom: 70px; }
.steps span {
  display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%;
  border: 1px solid var(--accent); color: var(--accent); font-family: var(--mono); margin-bottom: 16px;
}
.steps p, .values p { color: var(--muted); font-size: .97rem; margin: 0; }
.values { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; padding-top: 50px; border-top: 1px solid var(--border); }

/* FAQ */
details { border-bottom: 1px solid var(--border); padding: 4px 0; }
summary {
  cursor: pointer; list-style: none; padding: 18px 40px 18px 0; font-weight: 600; position: relative;
}
summary::-webkit-details-marker { display: none; }
summary::after { content: "+"; position: absolute; right: 6px; top: 50%; transform: translateY(-50%); color: var(--accent); font-size: 1.4rem; font-weight: 400; transition: transform .2s; }
details[open] summary::after { transform: translateY(-50%) rotate(45deg); }
details p { color: var(--muted); padding-bottom: 12px; }

/* Contact */
.contact { display: grid; grid-template-columns: 1fr; gap: 36px; justify-items: center; text-align: center; }
.contact > div > p { color: var(--muted); max-width: 36em; margin-inline: auto; }

/* Footer */
.footer { border-top: 1px solid var(--border); padding: 36px 0; color: var(--muted); font-size: .9rem; }
.footer__inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; }
.footer nav { display: flex; gap: 22px; }
.footer nav a { color: var(--muted); }
.footer p { margin: 0; }

/* Legal pages */
.legal { padding: 70px 0 100px; }
.legal h1 { font-size: 2.2rem; }
.legal h2 { font-size: 1.3rem; margin-top: 1.8em; }
.legal p, .legal li { color: #c6cfe2; }

/* Responsive */
@media (max-width: 980px) {
  .hero__grid, .split, .contact { grid-template-columns: 1fr; gap: 40px; }
  .cards { grid-template-columns: 1fr 1fr; }
  .card--featured { grid-row: auto; grid-column: 1 / -1; }
  .flow, .steps { grid-template-columns: 1fr 1fr; }
  .flow li::after { display: none; }
}
@media (max-width: 720px) {
  body { font-size: 16px; }
  .nav__toggle { display: block; }
  .nav__menu {
    position: absolute; top: 68px; left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 0;
    background: var(--bg); border-bottom: 1px solid var(--border);
    padding: 10px 20px 20px;
    display: none;
  }
  .nav__menu.open { display: flex; }
  .nav__menu a:not(.btn) { padding: 12px 0; border-bottom: 1px solid var(--border); }
  .nav__menu .btn { margin-top: 14px; text-align: center; }
  .hero { padding: 60px 0 70px; }
  .section { padding: 70px 0; }
  .cards, .flow, .steps, .values, .form__row { grid-template-columns: 1fr; }
  .form { padding: 22px; }
}
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
  .console__log li { opacity: 1; }
  html { scroll-behavior: auto; }
}

/* Páginas de servicio */
.svc-hero { padding: 70px 0 60px; background: radial-gradient(700px 350px at 85% 0%, rgba(34, 211, 166, .12), transparent 60%); }
.crumbs { font-size: .88rem; color: var(--muted); margin-bottom: 28px; }
.crumbs a { color: var(--muted); }
.card__icon--lg { width: 56px; height: 56px; }
.card__icon--lg svg { width: 28px; height: 28px; }
.prose h2 { font-size: 1.35rem; margin-top: 1.6em; }
.prose h2:first-child { margin-top: 0; }
.prose p { color: #cfd6e6; }
.cta-box { text-align: center; }
.cta-box p { color: var(--muted); }
.others { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 10px; }
.others a { display: inline-block; padding: .55em 1.1em; border: 1px solid var(--border); border-radius: 99px; color: var(--text); }
.others a:hover { border-color: var(--accent); text-decoration: none; }
.svc-hero .steps, .section .steps { margin-bottom: 0; }

.btn-row { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; }

/* Botón flotante de WhatsApp */
.wa-float {
  position: fixed; right: 20px; bottom: 20px; z-index: 60;
  width: 58px; height: 58px; border-radius: 50%;
  display: grid; place-items: center;
  background: #25d366; color: #fff;
  box-shadow: 0 8px 24px rgba(0, 0, 0, .4);
  transition: transform .15s, box-shadow .15s;
}
.wa-float svg { width: 30px; height: 30px; }
.wa-float:hover { transform: scale(1.07); box-shadow: 0 10px 28px rgba(0, 0, 0, .5); text-decoration: none; }
.wa-float:focus-visible { outline: 3px solid #fff; outline-offset: 3px; }
@media (max-width: 720px) { .wa-float { right: 14px; bottom: 14px; width: 54px; height: 54px; } }

/* Selector de idioma */
.lang, .nav__menu a.lang { font-family: var(--mono); font-size: .78rem; font-weight: 600; border: 1px solid var(--border); border-radius: 6px; padding: .25em .6em; color: var(--muted); }
.lang:hover, .nav__menu a.lang:hover { color: var(--text); border-color: var(--accent); text-decoration: none; }
.legalnav { display: flex; align-items: center; gap: 14px; }
@media (max-width: 720px) { .nav__menu a.lang { align-self: flex-start; margin: 12px 0 0; padding: .35em .8em; } }

/* Contacto directo */
.contact__cards { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; width: 100%; max-width: 700px; text-align: left; }
.contact__card { display: grid; gap: 6px; align-content: start; padding: 22px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); color: var(--text); transition: border-color .2s, transform .2s; }
a.contact__card:hover { border-color: var(--accent); transform: translateY(-2px); text-decoration: none; }
.contact__card span { font-family: var(--mono); font-size: .75rem; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); }
.contact__card strong { font-size: 1.05rem; font-weight: 600; word-break: break-word; }
@media (max-width: 720px) { .contact__cards { grid-template-columns: 1fr; } }

.contact__icon { display: grid; place-items: center; width: 44px; height: 44px; margin-bottom: 8px; border-radius: 12px; background: rgba(34, 211, 166, .1); font-style: normal; }
.contact__icon svg { width: 22px; height: 22px; fill: none; stroke: var(--accent); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.contact__icon svg.fill { fill: var(--accent); stroke: none; }
