/* ─── Reset & Base ─── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg: #0a0a0f;
  --bg-alt: #0f0f18;
  --surface: #14141f;
  --border: rgba(255,255,255,0.07);
  --accent: #7c3aed;
  --accent-2: #06b6d4;
  --text: #e2e2f0;
  --muted: #7a7a9a;
  --radius: 14px;
  --font: 'Inter', system-ui, sans-serif;
}

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
  overflow-x: hidden;
}

.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* ─── Gradient text ─── */
.gradient-text {
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-2) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ─── Buttons ─── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.65rem 1.4rem;
  border-radius: 8px;
  font-weight: 500;
  font-size: 0.95rem;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.2s;
  border: none;
  font-family: var(--font);
}
.btn--primary {
  background: var(--accent);
  color: #fff;
}
.btn--primary:hover { background: #6d28d9; transform: translateY(-1px); }
.btn--outline {
  border: 1px solid var(--border);
  color: var(--text);
  background: transparent;
}
.btn--outline:hover { border-color: var(--accent); color: var(--accent); }
.btn--ghost {
  background: rgba(255,255,255,0.05);
  color: var(--text);
}
.btn--ghost:hover { background: rgba(255,255,255,0.1); }
.btn--full { width: 100%; justify-content: center; }

/* ─── Nav ─── */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  border-bottom: 1px solid var(--border);
  background: rgba(10,10,15,0.85);
  backdrop-filter: blur(12px);
}
.nav__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}
.logo {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text);
  text-decoration: none;
  letter-spacing: -0.02em;
}
.logo__mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px; height: 28px;
  background: var(--accent);
  border-radius: 6px;
  font-size: 1rem;
  color: #fff;
  margin-right: 2px;
}
.nav__links {
  display: flex;
  align-items: center;
  gap: 2rem;
  list-style: none;
}
.nav__links a {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.9rem;
  transition: color 0.2s;
}
.nav__links a:hover { color: var(--text); }
.nav__burger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}
.nav__burger span {
  display: block;
  width: 22px; height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: all 0.3s;
}

/* ─── Hero ─── */
.hero {
  position: relative;
  padding: 140px 0 80px;
  overflow: hidden;
}
.hero__inner { position: relative; z-index: 1; }
.hero__badge {
  display: inline-block;
  padding: 0.3rem 0.85rem;
  background: rgba(124,58,237,0.12);
  border: 1px solid rgba(124,58,237,0.3);
  border-radius: 100px;
  font-size: 0.8rem;
  color: #a78bfa;
  margin-bottom: 1.5rem;
  letter-spacing: 0.04em;
}
.hero__title {
  font-size: clamp(2.2rem, 5vw, 3.6rem);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.03em;
  margin-bottom: 1.25rem;
}
.hero__sub {
  font-size: 1.1rem;
  color: var(--muted);
  max-width: 560px;
  margin-bottom: 2rem;
}
.hero__actions {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 3rem;
}
.hero__stats {
  display: flex;
  align-items: center;
  gap: 2rem;
  flex-wrap: wrap;
}
.stat__num {
  display: block;
  font-size: 1.7rem;
  font-weight: 700;
  letter-spacing: -0.03em;
}
.stat__label {
  font-size: 0.8rem;
  color: var(--muted);
}
.stat__divider {
  width: 1px;
  height: 36px;
  background: var(--border);
}
.hero__glow {
  position: absolute;
  top: -40%;
  right: -20%;
  width: 700px;
  height: 700px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(124,58,237,0.15) 0%, transparent 70%);
  pointer-events: none;
}

/* ─── Sections ─── */
.section { padding: 90px 0; }
.section--alt { background: var(--bg-alt); }
.section__header {
  text-align: center;
  margin-bottom: 3rem;
}
.section__tag {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent-2);
  margin-bottom: 0.75rem;
}
.section__title {
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  max-width: 560px;
  margin: 0 auto;
}

/* ─── Cards (servicios) ─── */
.cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.25rem;
}
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.75rem;
  transition: border-color 0.2s, transform 0.2s;
}
.card:hover { border-color: rgba(124,58,237,0.4); transform: translateY(-3px); }
.card__icon { font-size: 2rem; margin-bottom: 1rem; }
.card__title { font-size: 1.05rem; font-weight: 600; margin-bottom: 0.6rem; }
.card__text { color: var(--muted); font-size: 0.9rem; line-height: 1.65; }

/* ─── About ─── */
.about {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
}
.about__text .section__tag { display: inline-block; margin-bottom: 0.75rem; }
.about__text .section__title { text-align: left; margin: 0 0 1.25rem; }
.about__text p { color: var(--muted); margin-bottom: 1rem; }
.about__list {
  list-style: none;
  margin-top: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.about__list li {
  font-size: 0.9rem;
  color: var(--text);
}

/* Code block */
.code-block {
  background: #0d0d16;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  font-family: 'Fira Code', 'Courier New', monospace;
  font-size: 0.85rem;
}
.code-block__bar {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 0.6rem 1rem;
  background: rgba(255,255,255,0.03);
  border-bottom: 1px solid var(--border);
}
.dot {
  width: 10px; height: 10px;
  border-radius: 50%;
}
.dot--red    { background: #ff5f57; }
.dot--yellow { background: #febc2e; }
.dot--green  { background: #28c840; }
.code-block__filename {
  margin-left: 0.5rem;
  font-size: 0.75rem;
  color: var(--muted);
}
.code-block pre { padding: 1.5rem; }
.c-keyword { color: #c792ea; }
.c-class   { color: #82aaff; }
.c-fn      { color: #82aaff; }
.c-str     { color: #c3e88d; }
.c-bool    { color: #f78c6c; }

/* ─── Steps (proceso) ─── */
.steps {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 2rem;
  counter-reset: steps;
}
.step {
  padding: 1.5rem;
  border-left: 2px solid var(--border);
  transition: border-color 0.2s;
}
.step:hover { border-color: var(--accent); }
.step__num {
  font-size: 2.5rem;
  font-weight: 800;
  letter-spacing: -0.04em;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 0.75rem;
  line-height: 1;
}
.step__title { font-size: 1rem; font-weight: 600; margin-bottom: 0.5rem; }
.step__text { color: var(--muted); font-size: 0.875rem; }

/* ─── CTA / Contact ─── */
.cta {
  position: relative;
  overflow: hidden;
  background: var(--bg-alt);
}
.cta__inner {
  position: relative;
  z-index: 1;
  max-width: 640px;
  text-align: center;
}
.cta__title {
  font-size: clamp(1.7rem, 3vw, 2.4rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  margin-bottom: 0.75rem;
}
.cta__sub { color: var(--muted); margin-bottom: 2rem; }
.cta__email { margin-top: 1.25rem; font-size: 0.875rem; color: var(--muted); }
.cta__email a { color: var(--accent-2); text-decoration: none; }
.cta__email a:hover { text-decoration: underline; }
.cta__glow {
  right: auto;
  left: 50%;
  top: -30%;
  transform: translateX(-50%);
  width: 600px; height: 600px;
}

/* ─── Form ─── */
.form {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  text-align: left;
}
.form__row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.85rem;
}
.form__input {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.75rem 1rem;
  color: var(--text);
  font-family: var(--font);
  font-size: 0.9rem;
  transition: border-color 0.2s;
  width: 100%;
}
.form__input:focus {
  outline: none;
  border-color: var(--accent);
}
.form__input::placeholder { color: var(--muted); }
.form__textarea { resize: vertical; min-height: 120px; }

/* ─── Footer ─── */
.footer {
  border-top: 1px solid var(--border);
  padding: 2rem 0;
}
.footer__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
}
.footer__copy { font-size: 0.8rem; color: var(--muted); }
.footer__links a {
  font-size: 0.85rem;
  color: var(--muted);
  text-decoration: none;
}
.footer__links a:hover { color: var(--accent-2); }

/* ─── Fade-in animation ─── */
.fade-in {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.fade-in.visible {
  opacity: 1;
  transform: none;
}

/* ─── Responsive ─── */
@media (max-width: 768px) {
  .nav__links {
    display: none;
    position: fixed;
    top: 64px; left: 0; right: 0;
    background: var(--bg);
    flex-direction: column;
    align-items: flex-start;
    padding: 1.5rem;
    gap: 1.25rem;
    border-bottom: 1px solid var(--border);
  }
  .nav__links--open { display: flex; }
  .nav__burger { display: flex; }
  .nav__burger--open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .nav__burger--open span:nth-child(2) { opacity: 0; }
  .nav__burger--open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

  .about { grid-template-columns: 1fr; gap: 2.5rem; }
  .form__row { grid-template-columns: 1fr; }
  .hero { padding: 110px 0 60px; }
  .hero__stats { gap: 1rem; }
  .stat__divider { display: none; }
  .footer__inner { flex-direction: column; align-items: flex-start; }
}
