/* ========================================================
   Devtoria — estilos del sitio
   ======================================================== */

:root {
  --bg: #09070f;
  --bg-alt: #0c0a16;
  --surface: #14111f;
  --surface-2: #191531;
  --border: rgba(167, 139, 250, 0.16);
  --border-strong: rgba(167, 139, 250, 0.32);
  --text: #f5f3fb;
  --text-muted: #a9a4bf;
  --text-dim: #726d8a;
  --purple: #8b5cf6;
  --purple-2: #6d28d9;
  --purple-light: #c4b5fd;
  --gradient: linear-gradient(135deg, #a78bfa 0%, #7c3aed 100%);
  --radius-sm: 10px;
  --radius: 16px;
  --radius-lg: 24px;
  --font: "Plus Jakarta Sans", system-ui, -apple-system, sans-serif;
  --max-width: 1220px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }

a { color: inherit; text-decoration: none; }

button { font-family: inherit; cursor: pointer; }

.wrap {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

.eyebrow {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--purple-light);
  margin: 0 0 10px;
}

h1, h2, h3 { font-weight: 800; margin: 0; letter-spacing: -0.01em; }

h2 { font-size: clamp(26px, 3.2vw, 34px); color: var(--text); }

p { color: var(--text-muted); margin: 0; }

.accent { color: var(--purple-light); }

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

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 13px 24px;
  border-radius: 999px;
  font-size: 15px;
  font-weight: 700;
  border: 1px solid transparent;
  white-space: nowrap;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.btn:hover { transform: translateY(-1px); }

.btn-primary {
  background: var(--gradient);
  color: #fff;
  box-shadow: 0 8px 24px -8px rgba(124, 58, 237, 0.65);
}

.btn-primary:hover { box-shadow: 0 10px 30px -6px rgba(124, 58, 237, 0.8); }

.btn-outline {
  background: transparent;
  color: var(--text);
  border-color: var(--border-strong);
}

.btn-outline:hover { border-color: var(--purple); background: rgba(139, 92, 246, 0.08); }

.btn-sm { padding: 10px 18px; font-size: 14px; }

/* ---------------- Header ---------------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(9, 7, 15, 0.82);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
}

.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 78px;
}

.logo { display: flex; align-items: center; gap: 12px; }

.logo-mark {
  width: 40px;
  height: 40px;
  flex-shrink: 0;
}

.logo-text { display: flex; flex-direction: column; line-height: 1.1; }

.logo-text .name { font-size: 20px; font-weight: 800; color: var(--text); letter-spacing: -0.01em; }

.logo-text .tag {
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 0.14em;
  color: var(--text-dim);
  text-transform: uppercase;
  margin-top: 2px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 34px;
}

.nav-links a {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-muted);
  position: relative;
  padding-bottom: 4px;
}

.nav-links a:hover { color: var(--text); }

.nav-links a.active { color: var(--text); }

.nav-links a.active::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -6px;
  height: 2px;
  background: var(--gradient);
  border-radius: 2px;
}

.nav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--border-strong);
  border-radius: 10px;
  width: 42px;
  height: 42px;
  align-items: center;
  justify-content: center;
  color: var(--text);
}

.mobile-panel {
  display: none;
  flex-direction: column;
  gap: 4px;
  padding: 10px 24px 22px;
  border-bottom: 1px solid var(--border);
  background: var(--bg-alt);
}

.mobile-panel.open { display: flex; }

.mobile-panel a {
  padding: 12px 4px;
  font-weight: 600;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border);
}

.mobile-panel a:last-child { border-bottom: none; }

/* ---------------- Hero ---------------- */

.hero {
  position: relative;
  overflow: hidden;
  padding: 76px 0 90px;
  background:
    radial-gradient(700px 420px at 85% -10%, rgba(124, 58, 237, 0.30), transparent 60%),
    radial-gradient(500px 320px at -10% 30%, rgba(124, 58, 237, 0.16), transparent 60%);
}

.hero .wrap {
  display: grid;
  grid-template-columns: 1.25fr 0.9fr;
  gap: 48px;
  align-items: center;
}

.hero h1 {
  font-size: clamp(32px, 3.9vw, 44px);
  line-height: 1.15;
  margin: 14px 0 20px;
}

.hero p.lead {
  font-size: 16.5px;
  max-width: 520px;
  margin-bottom: 30px;
}

.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; margin-bottom: 40px; }

.hero-trust { display: flex; gap: 30px; flex-wrap: wrap; }

.trust-item { display: flex; align-items: center; gap: 10px; }

.trust-item .ic {
  width: 34px; height: 34px;
  border-radius: 9px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  color: var(--purple-light);
  flex-shrink: 0;
}

.trust-item span { font-size: 13.5px; font-weight: 700; color: var(--text); display: block; }

/* Hero device mockup (built with CSS/SVG, simplified from reference) */

.hero-visual { position: relative; display: flex; align-items: center; justify-content: center; min-height: 340px; }

.device-laptop {
  width: 100%;
  max-width: 380px;
  border-radius: 14px 14px 4px 4px;
  background: linear-gradient(160deg, #1b1730, #100e1c);
  border: 1px solid var(--border-strong);
  padding: 10px 10px 0;
  box-shadow: 0 30px 60px -20px rgba(0,0,0,0.6);
}

.device-laptop .screen {
  border-radius: 8px;
  overflow: hidden;
  background: var(--bg-alt);
  border: 1px solid var(--border);
}

.device-laptop .bar {
  display: flex; gap: 5px; padding: 8px 10px;
  border-bottom: 1px solid var(--border);
}

.device-laptop .bar span { width: 7px; height: 7px; border-radius: 50%; background: var(--text-dim); opacity: 0.5; }

.device-laptop .content { padding: 20px 18px 24px; }

.device-laptop .content .headline {
  font-size: 15px; font-weight: 800; color: var(--text); line-height: 1.3; max-width: 190px; margin-bottom: 14px;
}

.mini-pill {
  display: inline-block; padding: 6px 14px; border-radius: 999px;
  background: var(--gradient); font-size: 10.5px; font-weight: 700; color: #fff; margin-bottom: 16px;
}

.mini-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }

.mini-cards div {
  background: var(--surface-2); border: 1px solid var(--border);
  border-radius: 8px; height: 46px;
  display: flex; align-items: center; justify-content: center;
}

.mini-cards div svg { color: var(--purple-light); width: 16px; height: 16px; }

.device-laptop .base {
  height: 12px;
  margin: 10px -10px 0;
  background: linear-gradient(180deg, #211d38, #17142a);
  border-radius: 0 0 10px 10px;
}

.device-phone {
  position: absolute;
  right: -6px;
  bottom: -18px;
  width: 132px;
  border-radius: 20px;
  background: linear-gradient(160deg, #1b1730, #100e1c);
  border: 1px solid var(--border-strong);
  padding: 8px;
  box-shadow: 0 20px 40px -14px rgba(0,0,0,0.65);
}

.device-phone .screen {
  border-radius: 13px;
  overflow: hidden;
  background: var(--bg-alt);
  border: 1px solid var(--border);
  padding: 14px 10px;
}

.device-phone .headline { font-size: 10.5px; font-weight: 800; margin-bottom: 8px; line-height: 1.3; }

.device-phone .mini-pill { padding: 5px 10px; font-size: 8.5px; margin-bottom: 0; }

/* ---------------- Section shell ---------------- */

section { padding: 84px 0; border-bottom: 1px solid var(--border); }

.section-head {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 30px;
  align-items: end;
  margin-bottom: 44px;
}

.section-head p { max-width: 420px; justify-self: end; text-align: right; }

/* ---------------- Servicios ---------------- */

.services-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.service-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  display: flex;
  gap: 16px;
  transition: border-color 0.15s ease, transform 0.15s ease;
}

.service-card:hover { border-color: var(--border-strong); transform: translateY(-2px); }

.icon-box {
  width: 46px; height: 46px;
  border-radius: 12px;
  background: var(--surface-2);
  border: 1px solid var(--border-strong);
  display: flex; align-items: center; justify-content: center;
  color: var(--purple-light);
  flex-shrink: 0;
}

.icon-box svg { width: 22px; height: 22px; }

.service-card h3 { font-size: 16px; margin-bottom: 6px; }

.service-card p { font-size: 14px; }

/* ---------------- Proceso ---------------- */

.process {
  background: var(--bg-alt);
}

.process .section-head { grid-template-columns: 1fr; }

.process-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 30px;
  margin-bottom: 46px;
  flex-wrap: wrap;
}

.process-top p { max-width: 380px; margin: 14px 0 20px; }

.process-steps {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  position: relative;
}

.step { text-align: center; padding: 0 10px; position: relative; }

.step-num {
  width: 30px; height: 30px;
  border-radius: 50%;
  background: var(--gradient);
  color: #fff;
  font-weight: 800;
  font-size: 13px;
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 14px;
}

.step-icon {
  width: 62px; height: 62px;
  border-radius: 16px;
  background: var(--surface);
  border: 1px solid var(--border-strong);
  display: flex; align-items: center; justify-content: center;
  color: var(--purple-light);
  margin: 0 auto 16px;
}

.step-icon svg { width: 26px; height: 26px; }

.step h3 { font-size: 15px; margin-bottom: 6px; }

.step p { font-size: 13px; }

.step-arrow {
  position: absolute;
  top: 46px;
  right: -14px;
  color: var(--text-dim);
}

.step:last-child .step-arrow { display: none; }

/* ---------------- Portafolio (placeholder) ---------------- */

.portfolio-placeholder {
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius-lg);
  padding: 64px 32px;
  text-align: center;
  background: var(--surface);
}

.portfolio-placeholder .ic {
  width: 56px; height: 56px;
  border-radius: 14px;
  background: var(--surface-2);
  border: 1px solid var(--border-strong);
  color: var(--purple-light);
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 20px;
}

.portfolio-placeholder h3 { font-size: 19px; margin-bottom: 10px; }

.portfolio-placeholder p { max-width: 460px; margin: 0 auto; font-size: 14.5px; }

/* ---------------- Testimonios (placeholder) ---------------- */

.testi-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.testi-card {
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius);
  padding: 24px;
  background: var(--surface);
}

.testi-card .who { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }

.testi-avatar {
  width: 40px; height: 40px;
  border-radius: 50%;
  background: var(--surface-2);
  border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  color: var(--text-dim);
}

.testi-card .who .label { font-size: 13.5px; font-weight: 700; color: var(--text-muted); }

.testi-card .who .sub { font-size: 12px; color: var(--text-dim); }

.testi-card p.msg { font-size: 13.5px; font-style: italic; color: var(--text-dim); }

/* ---------------- CTA final ---------------- */

.cta-final { border-bottom: none; padding: 46px 0; }

.cta-final .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 30px;
  flex-wrap: wrap;
}

.cta-final .logo { flex-shrink: 0; }

.cta-final .msg h3 { font-size: 19px; margin-bottom: 4px; }

.cta-final .msg p { font-size: 14px; }

/* ---------------- Footer ---------------- */

footer.site-footer { padding: 26px 0; }

footer.site-footer .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 14px;
}

footer.site-footer p { font-size: 13px; color: var(--text-dim); }

.social-links { display: flex; gap: 10px; }

.social-links a {
  width: 36px; height: 36px;
  border-radius: 9px;
  border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  color: var(--text-muted);
}

.social-links a:hover { color: var(--purple-light); border-color: var(--border-strong); }

/* ---------------- Responsive ---------------- */

@media (max-width: 980px) {
  .hero .wrap { grid-template-columns: 1fr; }
  .hero-visual { margin-top: 20px; }
  .section-head { grid-template-columns: 1fr; }
  .section-head p { justify-self: start; text-align: left; }
  .services-grid { grid-template-columns: repeat(2, 1fr); }
  .process-steps { grid-template-columns: repeat(2, 1fr); row-gap: 34px; }
  .step-arrow { display: none; }
  .testi-grid { grid-template-columns: 1fr; }
}

@media (max-width: 760px) {
  .nav-links { display: none; }
  .nav-toggle { display: flex; }
  #desktopCta { display: none; }
  .services-grid { grid-template-columns: 1fr; }
  .process-steps { grid-template-columns: 1fr; }
  .cta-final .wrap { flex-direction: column; text-align: center; }
  footer.site-footer .wrap { flex-direction: column; text-align: center; }
}

/* ========================================================
   Decoración y vitalidad
   ======================================================== */

body { position: relative; overflow-x: clip; }

/* --- formas angulares de esquina (acento de marca) --- */

.corner-accent {
  position: absolute;
  pointer-events: none;
  z-index: 0;
  opacity: 0.9;
}

.corner-accent.top-left {
  top: -40px;
  left: -60px;
  width: 260px;
  height: 260px;
}

.corner-accent.bottom-left {
  bottom: -60px;
  left: -70px;
  width: 300px;
  height: 300px;
  transform: rotate(8deg);
}

.hero { position: relative; }
.site-footer, .cta-final { position: relative; overflow: hidden; }

/* --- blobs de degradado flotantes --- */

.glow-blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(70px);
  pointer-events: none;
  z-index: 0;
}

.hero .glow-blob.b1 {
  width: 380px; height: 380px;
  background: radial-gradient(circle, rgba(167,139,250,0.35), transparent 70%);
  top: -120px; right: 8%;
  animation: float-slow 10s ease-in-out infinite;
}

.hero .glow-blob.b2 {
  width: 260px; height: 260px;
  background: radial-gradient(circle, rgba(109,40,217,0.30), transparent 70%);
  bottom: -80px; left: 4%;
  animation: float-slow 12s ease-in-out infinite reverse;
}

.process { position: relative; overflow: hidden; }

.process .glow-blob {
  width: 420px; height: 420px;
  background: radial-gradient(circle, rgba(139,92,246,0.22), transparent 70%);
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  animation: pulse-soft 7s ease-in-out infinite;
}

.cta-final .glow-blob {
  width: 500px; height: 260px;
  background: radial-gradient(ellipse, rgba(139,92,246,0.28), transparent 70%);
  top: -60px; left: 50%;
  transform: translateX(-50%);
}

.hero .wrap, .process .wrap, .cta-final .wrap, section .wrap { position: relative; z-index: 1; }

/* --- textura de puntos --- */

.dot-grid {
  position: absolute;
  inset: 0;
  z-index: 0;
  opacity: 0.5;
  background-image: radial-gradient(rgba(167, 139, 250, 0.18) 1px, transparent 1px);
  background-size: 26px 26px;
  -webkit-mask-image: radial-gradient(ellipse 60% 60% at 50% 0%, #000 30%, transparent 75%);
  mask-image: radial-gradient(ellipse 60% 60% at 50% 0%, #000 30%, transparent 75%);
  pointer-events: none;
}

/* --- badge de disponibilidad --- */

.avail-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 14px 7px 10px;
  border-radius: 999px;
  background: var(--surface-2);
  border: 1px solid var(--border-strong);
  font-size: 12.5px;
  font-weight: 700;
  color: var(--text-muted);
  margin-bottom: 18px;
}

.avail-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: #34d399;
  box-shadow: 0 0 0 0 rgba(52, 211, 153, 0.6);
  animation: dot-pulse 1.8s ease-out infinite;
  flex-shrink: 0;
}

/* --- gradiente animado en el texto de acento --- */

.accent-grad {
  background-size: 200% auto;
  animation: grad-shift 5s linear infinite;
}

/* --- botón primario con brillo --- */

.btn-primary { position: relative; }

.btn-primary::after {
  content: "";
  position: absolute;
  inset: -2px;
  border-radius: 999px;
  background: var(--gradient);
  filter: blur(10px);
  opacity: 0;
  z-index: -1;
  transition: opacity 0.25s ease;
}

.btn-primary:hover::after { opacity: 0.55; }

/* --- tarjetas: elevación + resplandor en hover --- */

.service-card {
  position: relative;
  overflow: hidden;
}

.service-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(180px circle at var(--mx, 50%) var(--my, 0%), rgba(139,92,246,0.16), transparent 70%);
  opacity: 0;
  transition: opacity 0.25s ease;
  pointer-events: none;
}

.service-card:hover::before { opacity: 1; }

.service-card:hover {
  border-color: var(--border-strong);
  transform: translateY(-4px);
  box-shadow: 0 18px 40px -22px rgba(124, 58, 237, 0.55);
}

.service-card:hover .icon-box {
  background: var(--gradient);
  border-color: transparent;
  color: #fff;
  transform: scale(1.06) rotate(-4deg);
}

.icon-box { transition: transform 0.25s ease, background 0.25s ease, color 0.25s ease; }

.step-icon { transition: transform 0.25s ease, box-shadow 0.25s ease; }

.step:hover .step-icon {
  transform: translateY(-4px);
  box-shadow: 0 14px 30px -14px rgba(124, 58, 237, 0.6);
  border-color: var(--purple);
}

/* --- línea conectora animada entre pasos --- */

.step-arrow svg { animation: nudge-right 1.8s ease-in-out infinite; }

/* --- formas flotantes decorativas junto al mockup del héroe --- */

.floaty {
  position: absolute;
  border-radius: 10px;
  border: 1px solid var(--border-strong);
  background: var(--surface-2);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--purple-light);
  box-shadow: 0 14px 30px -14px rgba(0,0,0,0.6);
}

.floaty.f1 { width: 46px; height: 46px; top: 6%; left: 2%; animation: float-slow 6s ease-in-out infinite; }
.floaty.f2 { width: 38px; height: 38px; bottom: 14%; left: -4%; animation: float-slow 7.5s ease-in-out infinite reverse; }
.floaty.f3 { width: 34px; height: 34px; top: 46%; right: -2%; animation: float-slow 5.5s ease-in-out infinite; }

/* --- animaciones al hacer scroll --- */

.reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.reveal.in-view { opacity: 1; transform: translateY(0); }

.reveal-stagger.in-view > * { animation: fade-up 0.6s ease both; }
.reveal-stagger.in-view > *:nth-child(2) { animation-delay: 0.08s; }
.reveal-stagger.in-view > *:nth-child(3) { animation-delay: 0.16s; }
.reveal-stagger.in-view > *:nth-child(4) { animation-delay: 0.24s; }
.reveal-stagger.in-view > *:nth-child(5) { animation-delay: 0.32s; }
.reveal-stagger.in-view > *:nth-child(6) { animation-delay: 0.4s; }

/* --- keyframes --- */

@keyframes float-slow {
  0%, 100% { transform: translateY(0) translateX(0); }
  50% { transform: translateY(-16px) translateX(6px); }
}

@keyframes pulse-soft {
  0%, 100% { opacity: 0.7; transform: translate(-50%, -50%) scale(1); }
  50% { opacity: 1; transform: translate(-50%, -50%) scale(1.08); }
}

@keyframes dot-pulse {
  0% { box-shadow: 0 0 0 0 rgba(52, 211, 153, 0.55); }
  70% { box-shadow: 0 0 0 8px rgba(52, 211, 153, 0); }
  100% { box-shadow: 0 0 0 0 rgba(52, 211, 153, 0); }
}

@keyframes grad-shift {
  0% { background-position: 0% 50%; }
  100% { background-position: 200% 50%; }
}

@keyframes nudge-right {
  0%, 100% { transform: translateX(0); opacity: 0.7; }
  50% { transform: translateX(4px); opacity: 1; }
}

@keyframes fade-up {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 760px) {
  .corner-accent { display: none; }
  .floaty { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  .glow-blob, .avail-dot, .accent-grad, .btn-primary::after, .step-arrow svg, .floaty {
    animation: none !important;
  }
  .reveal, .reveal-stagger > * { opacity: 1 !important; transform: none !important; animation: none !important; }
}
