/* ==========================================================
   Enter | Soluciones Informáticas
   ========================================================== */

:root {
  --bg: #0b0b1f;
  --bg-alt: #0f0f28;
  --surface: #14143a;
  --surface-2: #1b1b4a;
  --border: rgba(140, 140, 255, 0.14);

  --violet: #7c3aed;
  --violet-2: #8b5cf6;
  --blue: #3b5bfd;
  --green: #1fc28a;

  --text: #e8e8f5;
  --muted: #a0a3c4;

  --grad: linear-gradient(135deg, var(--violet) 0%, var(--blue) 100%);

  --radius: 18px;
  --shadow: 0 20px 50px -20px rgba(0, 0, 0, 0.6);
  --header-h: 72px;

  --font: "Poppins", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "JetBrains Mono", ui-monospace, Consolas, monospace;
}

/* ---------- Base ---------- */
*,
*::before,
*::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--header-h);
}

body {
  margin: 0;
  font-family: var(--font);
  font-size: 1rem;
  line-height: 1.7;
  color: var(--text);
  background: var(--bg);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; margin: 0; padding: 0; }
h1, h2, h3 { line-height: 1.2; margin: 0; }
p { margin: 0 0 1rem; }

::selection { background: var(--violet); color: #fff; }

.container {
  width: 100%;
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 20px;
}

.mono { font-family: var(--mono); }

.text-gradient {
  background: linear-gradient(90deg, var(--violet-2), var(--blue) 60%, var(--green));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1rem;
  font-size: 0.85rem;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
}
.eyebrow .mono { color: var(--green); letter-spacing: 0; }

/* ---------- Botones ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.85rem 1.6rem;
  border: 1px solid transparent;
  border-radius: 999px;
  font: inherit;
  font-weight: 500;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s, background 0.2s, border-color 0.2s;
}
.btn--primary {
  background: var(--grad);
  color: #fff;
  box-shadow: 0 10px 30px -10px rgba(91, 76, 250, 0.8);
}
.btn--primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 36px -10px rgba(91, 76, 250, 0.95);
}
.btn--ghost {
  border-color: var(--border);
  background: rgba(255, 255, 255, 0.03);
  color: var(--text);
}
.btn--ghost:hover {
  border-color: var(--green);
  color: var(--green);
}
.btn--block { width: 100%; }
.btn:disabled { opacity: 0.6; cursor: wait; transform: none; }

/* ---------- Header ---------- */
.header {
  position: fixed;
  inset: 0 0 auto;
  z-index: 100;
  height: var(--header-h);
  transition: background 0.3s, border-color 0.3s, backdrop-filter 0.3s;
  border-bottom: 1px solid transparent;
}
.header.is-scrolled {
  background: rgba(11, 11, 31, 0.75);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-color: var(--border);
}
.header__inner {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand { display: inline-flex; align-items: center; gap: 0.6rem; }
.brand__mark { width: 44px; height: 37px; }
.brand__text {
  font-size: 1.6rem;
  font-weight: 500;
  letter-spacing: -0.02em;
  line-height: 1;
}

.nav__list { display: flex; align-items: center; gap: 0.25rem; }
.nav__link {
  display: block;
  padding: 0.5rem 0.9rem;
  border-radius: 999px;
  font-size: 0.95rem;
  color: var(--muted);
  transition: color 0.2s, background 0.2s;
}
.nav__link:hover,
.nav__link.is-active { color: var(--text); }
.nav__link.is-active:not(.nav__link--cta) { background: rgba(255, 255, 255, 0.05); }
.nav__link--cta {
  margin-left: 0.5rem;
  color: #fff;
  background: var(--grad);
}
.nav__link--cta:hover { color: #fff; filter: brightness(1.1); }

.nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.03);
  cursor: pointer;
  position: relative;
}
.nav-toggle span {
  position: absolute;
  left: 12px;
  right: 12px;
  height: 2px;
  border-radius: 2px;
  background: var(--text);
  transition: transform 0.3s, opacity 0.3s;
}
.nav-toggle span:nth-child(1) { top: 14px; }
.nav-toggle span:nth-child(2) { top: 21px; }
.nav-toggle span:nth-child(3) { top: 28px; }
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  align-items: center;
  padding: calc(var(--header-h) + 40px) 0 80px;
  overflow: hidden;
}
.hero__bg { position: absolute; inset: 0; pointer-events: none; }

.grid-lines {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(140, 140, 255, 0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(140, 140, 255, 0.06) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(ellipse at 50% 40%, #000 20%, transparent 70%);
  -webkit-mask-image: radial-gradient(ellipse at 50% 40%, #000 20%, transparent 70%);
}

.glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(90px);
  opacity: 0.45;
}
.glow--1 { width: 480px; height: 480px; background: var(--violet); top: -120px; left: -120px; }
.glow--2 { width: 420px; height: 420px; background: var(--blue); bottom: -140px; right: -100px; opacity: 0.35; }

.pixel {
  position: absolute;
  border-radius: 4px;
  animation: float 8s ease-in-out infinite;
}
.p1 { width: 14px; height: 14px; background: var(--violet); top: 18%; left: 8%; }
.p2 { width: 20px; height: 20px; background: var(--violet-2); top: 26%; left: 12%; animation-delay: -2s; }
.p3 { width: 16px; height: 16px; background: var(--green); top: 70%; left: 6%; animation-delay: -4s; }
.p4 { width: 12px; height: 12px; background: var(--blue); top: 14%; right: 18%; animation-delay: -1s; }
.p5 { width: 18px; height: 18px; background: var(--green); bottom: 16%; right: 10%; animation-delay: -3s; }
.p6 { width: 10px; height: 10px; background: var(--violet); bottom: 28%; left: 46%; animation-delay: -5s; }

@keyframes float {
  0%, 100% { transform: translateY(0) rotate(0); }
  50% { transform: translateY(-18px) rotate(12deg); }
}

.hero__inner {
  position: relative;
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  align-items: center;
  gap: 56px;
}
.hero__title {
  font-size: clamp(2.3rem, 5.2vw, 3.9rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  margin-bottom: 1.4rem;
}
.hero__subtitle {
  max-width: 34rem;
  font-size: 1.1rem;
  color: var(--muted);
  margin-bottom: 2.2rem;
}
.hero__actions { display: flex; flex-wrap: wrap; gap: 1rem; }

/* Terminal */
.terminal {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: rgba(20, 20, 58, 0.75);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: var(--shadow), 0 0 0 1px rgba(124, 58, 237, 0.15), 0 0 80px -20px rgba(59, 91, 253, 0.5);
  overflow: hidden;
}
.terminal__bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 14px 18px;
  background: rgba(255, 255, 255, 0.03);
  border-bottom: 1px solid var(--border);
}
.dot { width: 12px; height: 12px; border-radius: 50%; }
.dot--r { background: #ff5f57; }
.dot--y { background: #febc2e; }
.dot--g { background: #28c840; }
.terminal__title {
  margin-left: auto;
  font-family: var(--mono);
  font-size: 0.8rem;
  color: var(--muted);
}
.terminal__body {
  margin: 0;
  padding: 22px 22px 26px;
  min-height: 290px;
  font-family: var(--mono);
  font-size: 0.9rem;
  line-height: 1.8;
  white-space: pre-wrap;
  word-break: break-word;
  color: var(--text);
}
.terminal__body code { font-family: inherit; }
.t-prompt { color: var(--violet-2); }
.t-cmd { color: var(--text); }
.t-ok { color: var(--green); }
.t-dim { color: var(--muted); }
.t-blue { color: #7f97ff; }
.cursor {
  color: var(--green);
  font-weight: 600;
  animation: blink 1s steps(1) infinite;
}
@keyframes blink { 50% { opacity: 0; } }

.scroll-hint {
  position: absolute;
  left: 50%;
  bottom: 28px;
  width: 26px;
  height: 42px;
  margin-left: -13px;
  border: 2px solid var(--border);
  border-radius: 14px;
}
.scroll-hint span {
  position: absolute;
  top: 8px;
  left: 50%;
  width: 4px;
  height: 8px;
  margin-left: -2px;
  border-radius: 2px;
  background: var(--green);
  animation: scroll 1.8s ease-in-out infinite;
}
@keyframes scroll {
  0% { transform: translateY(0); opacity: 1; }
  100% { transform: translateY(14px); opacity: 0; }
}

/* ---------- Secciones ---------- */
.section { padding: 110px 0; position: relative; }
.section--alt { background: var(--bg-alt); }
.section__head { max-width: 640px; margin: 0 auto 56px; text-align: center; }
.section__title {
  font-size: clamp(1.9rem, 3.8vw, 2.7rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 1rem;
}
.section__lead { color: var(--muted); font-size: 1.05rem; }

/* ---------- Servicios ---------- */
.cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.card {
  position: relative;
  padding: 32px 28px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: linear-gradient(180deg, var(--surface) 0%, rgba(20, 20, 58, 0.4) 100%);
  transition: transform 0.3s, border-color 0.3s, box-shadow 0.3s;
  overflow: hidden;
}
.card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(400px circle at var(--mx, 50%) var(--my, 0%), rgba(124, 58, 237, 0.18), transparent 40%);
  opacity: 0;
  transition: opacity 0.3s;
  pointer-events: none;
}
.card:hover {
  transform: translateY(-6px);
  border-color: rgba(124, 58, 237, 0.5);
  box-shadow: 0 24px 50px -24px rgba(91, 76, 250, 0.6);
}
.card:hover::before { opacity: 1; }
.card__icon {
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  margin-bottom: 1.4rem;
  border-radius: 14px;
  background: var(--grad);
  box-shadow: 0 10px 24px -10px rgba(91, 76, 250, 0.9);
}
.card__icon svg,
.contact__mail svg {
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.card__icon svg { width: 28px; height: 28px; color: #fff; }
.card__title { font-size: 1.2rem; font-weight: 600; margin-bottom: 0.6rem; }
.card__text { color: var(--muted); margin: 0; font-size: 0.97rem; }

/* ---------- Nosotros ---------- */
.about {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  align-items: center;
  gap: 72px;
}
.about__media { position: relative; display: flex; justify-content: center; }
.about__media::before {
  content: "";
  position: absolute;
  width: 85%;
  aspect-ratio: 1;
  border-radius: 50%;
  background: var(--grad);
  filter: blur(70px);
  opacity: 0.4;
}
.about__logo {
  position: relative;
  width: min(100%, 400px);
  aspect-ratio: 1;
  border-radius: 32px;
  overflow: hidden;
  background: #f2f1ef;
  box-shadow: var(--shadow);
  transform: rotate(-3deg);
  transition: transform 0.4s;
}
.about__logo:hover { transform: rotate(0) scale(1.02); }
.about__logo img { width: 100%; height: 100%; object-fit: cover; transform: scale(1.06); }
.about__content p { color: var(--muted); }
.about__content strong { color: var(--text); font-weight: 600; }

.stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-top: 2rem;
}
.stat {
  padding: 20px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: var(--surface);
  text-align: center;
}
.stat__num,
.stat__plus {
  font-size: 2.2rem;
  font-weight: 700;
  line-height: 1;
}
.stat__plus { color: var(--green); }
.stat__label {
  display: block;
  margin-top: 0.5rem;
  font-size: 0.85rem;
  color: var(--muted);
}

/* ---------- Proceso ---------- */
.steps {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  counter-reset: step;
  position: relative;
}
.steps::before {
  content: "";
  position: absolute;
  top: 28px;
  left: 12%;
  right: 12%;
  height: 2px;
  background: linear-gradient(90deg, var(--violet), var(--blue), var(--green));
  opacity: 0.5;
}
.step { position: relative; text-align: center; padding: 0 8px; }
.step__num {
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  margin: 0 auto 1.2rem;
  border: 2px solid var(--violet);
  border-radius: 50%;
  background: var(--bg);
  font-family: var(--mono);
  font-weight: 600;
  color: var(--green);
  position: relative;
  z-index: 1;
  box-shadow: 0 0 24px -4px rgba(124, 58, 237, 0.7);
}
.step__title { font-size: 1.15rem; font-weight: 600; margin-bottom: 0.5rem; }
.step p { color: var(--muted); font-size: 0.95rem; }


/* ---------- Proyectos ---------- */
.projects {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.project {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  overflow: hidden;
  transition: transform 0.3s, box-shadow 0.3s, border-color 0.3s;
}
.project:hover {
  transform: translateY(-6px);
  border-color: rgba(59, 91, 253, 0.5);
  box-shadow: 0 24px 50px -24px rgba(59, 91, 253, 0.6);
}
.project__thumb {
  aspect-ratio: 16 / 10;
  display: grid;
  place-items: center;
  font-size: 1.6rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.92);
  position: relative;
  overflow: hidden;
}
.project__thumb::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.08) 1px, transparent 1px);
  background-size: 28px 28px;
}
.project__thumb span { position: relative; z-index: 1; transition: transform 0.4s; }
.project:hover .project__thumb span { transform: scale(1.1); }
.project__thumb--1 { background: linear-gradient(135deg, #7c3aed, #3b5bfd); }
.project__thumb--2 { background: linear-gradient(135deg, #3b5bfd, #1fc28a); }
.project__thumb--3 { background: linear-gradient(135deg, #1fc28a, #7c3aed); }
.project__body { padding: 24px 24px 28px; }
.project__title { font-size: 1.15rem; font-weight: 600; margin: 0.8rem 0 0.5rem; }
.project__body p { color: var(--muted); font-size: 0.95rem; margin: 0; }
.tag {
  display: inline-block;
  padding: 0.2rem 0.75rem;
  border-radius: 999px;
  background: rgba(31, 194, 138, 0.12);
  color: var(--green);
  font-size: 0.78rem;
  font-weight: 500;
}

/* ---------- Contacto ---------- */
.contact {
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  gap: 64px;
  align-items: start;
}
.contact__info .section__lead { margin-bottom: 2rem; }
.contact__mail {
  display: inline-flex;
  align-items: center;
  gap: 0.8rem;
  padding: 0.9rem 1.3rem;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--surface);
  font-weight: 500;
  word-break: break-all;
  transition: border-color 0.2s, color 0.2s;
}
.contact__mail svg { width: 22px; height: 22px; flex-shrink: 0; color: var(--green); }
.contact__mail:hover { border-color: var(--green); color: var(--green); }

.contact__links { display: flex; flex-direction: column; align-items: flex-start; gap: 12px; }

.form {
  padding: 36px;
  border: 1px solid var(--border);
  border-radius: 24px;
  background: linear-gradient(180deg, var(--surface) 0%, rgba(20, 20, 58, 0.5) 100%);
  box-shadow: var(--shadow);
}
.form__row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.field { margin-bottom: 18px; }
.field label {
  display: block;
  margin-bottom: 0.4rem;
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--muted);
}
.field input,
.field textarea {
  width: 100%;
  padding: 0.85rem 1rem;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: rgba(11, 11, 31, 0.6);
  color: var(--text);
  font: inherit;
  font-size: 0.97rem;
  resize: vertical;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.field input::placeholder,
.field textarea::placeholder { color: #6a6d92; }
.field input:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--violet);
  box-shadow: 0 0 0 4px rgba(124, 58, 237, 0.2);
}
.field input:-webkit-autofill,
.field input:-webkit-autofill:hover,
.field input:-webkit-autofill:focus {
  -webkit-text-fill-color: var(--text);
  -webkit-box-shadow: 0 0 0 1000px #0e0e2a inset;
  caret-color: var(--text);
  transition: background-color 9999s ease-out;
}
.field.has-error input,
.field.has-error textarea { border-color: #ff6b81; }
.hidden-field { display: none; }
.form__status { margin: 1rem 0 0; min-height: 1.5em; text-align: center; font-size: 0.95rem; }
.form__status.is-ok { color: var(--green); }
.form__status.is-error { color: #ff6b81; }

/* ---------- Footer ---------- */
.footer {
  border-top: 1px solid var(--border);
  background: var(--bg-alt);
  padding: 56px 0 0;
}
.footer__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding-bottom: 36px;
}
.footer__tagline {
  margin: 0.5rem 0 0;
  font-size: 0.75rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--muted);
}
.footer__links { display: flex; flex-wrap: wrap; gap: 8px 28px; }
.footer__links a { color: var(--muted); transition: color 0.2s; }
.footer__links a:hover { color: var(--text); }
.footer__bottom {
  padding-top: 22px;
  padding-bottom: 22px;
  border-top: 1px solid var(--border);
  text-align: center;
  font-size: 0.85rem;
  color: var(--muted);
}
.footer__bottom p { margin: 0; }

/* ---------- Animación de aparición ---------- */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}
.reveal.is-visible { opacity: 1; transform: none; }
.no-js .reveal { opacity: 1; transform: none; }

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
  .cards, .projects { grid-template-columns: repeat(2, 1fr); }
  .hero__inner { gap: 40px; }
}

@media (max-width: 880px) {
  .nav-toggle { display: block; }
  .nav {
    position: fixed;
    top: var(--header-h);
    left: 0;
    right: 0;
    padding: 16px 20px 28px;
    background: rgba(11, 11, 31, 0.97);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border-bottom: 1px solid var(--border);
    transform: translateY(-12px);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.25s, transform 0.25s, visibility 0.25s;
  }
  .nav.is-open { opacity: 1; transform: none; visibility: visible; }
  .nav__list { flex-direction: column; align-items: stretch; gap: 4px; }
  .nav__link { padding: 0.8rem 1rem; font-size: 1.05rem; }
  .nav__link--cta { margin: 8px 0 0; text-align: center; }

  .hero__inner,
  .about,
  .contact { grid-template-columns: 1fr; }
  .hero__inner { text-align: center; }
  .hero__subtitle { margin-left: auto; margin-right: auto; }
  .hero__actions { justify-content: center; }
  .terminal { max-width: 560px; width: 100%; margin: 0 auto; text-align: left; }

  .about { gap: 48px; }
  .about__logo { width: min(100%, 300px); }

  .steps { grid-template-columns: repeat(2, 1fr); row-gap: 40px; }
  .steps::before { display: none; }

  .contact { gap: 40px; }
}

@media (max-width: 600px) {
  .section { padding: 80px 0; }
  .section__head { margin-bottom: 40px; }
  .cards, .projects { grid-template-columns: 1fr; }
  .form { padding: 24px 20px; }
  .form__row { grid-template-columns: 1fr; gap: 0; }
  .stats { gap: 10px; }
  .stat { padding: 16px 8px; }
  .stat__num, .stat__plus { font-size: 1.7rem; }
  .terminal__body { font-size: 0.8rem; min-height: 250px; padding: 18px; }
  .hero__actions .btn { flex: 1 1 100%; }
  .footer__inner { flex-direction: column; text-align: center; }
  .footer__links { justify-content: center; }
  .scroll-hint { display: none; }
}

@media (max-width: 420px) {
  .steps { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .reveal { opacity: 1; transform: none; }
}
