/* ---------- Variables ---------- */
:root {
  --bg: #05060a;
  --bg-alt: #0a0c13;
  --surface: #0f121a;
  --border: rgba(255, 255, 255, 0.08);
  --text: #edf0f7;
  --text-muted: #8992a6;
  --gold: #cda45e;
  --blue: #2e8eff;
  --grad: linear-gradient(135deg, var(--gold), var(--blue));
  --radius: 16px;
  --radius-sm: 10px;
  --shadow: 0 20px 50px rgba(0, 0, 0, 0.45);
  --container-w: 1160px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-mono: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
  --font-display: "Playfair Display", Georgia, "Times New Roman", serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  position: relative;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }
h1, h2, h3, h4 { line-height: 1.2; font-weight: 800; letter-spacing: -0.01em; }

.container { max-width: var(--container-w); margin: 0 auto; padding: 0 24px; }

:focus-visible { outline: 2px solid var(--blue); outline-offset: 3px; }

/* ---------- Fondo Matrix ---------- */
#matrixCanvas {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  opacity: 0.65;
}

/* ---------- Botones ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 24px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.95rem;
  transition: transform 0.15s ease, opacity 0.15s ease, background 0.15s ease, box-shadow .15s ease;
  border: 1px solid transparent;
  cursor: pointer;
}
.btn:hover { transform: translateY(-1px); }

.btn-primary {
  background: var(--grad);
  color: #05060a;
  box-shadow: 0 0 24px rgba(255, 31, 61, 0.25);
}
.btn-primary:hover { box-shadow: 0 0 32px rgba(46, 142, 255, 0.35); }

.btn-ghost {
  background: rgba(255, 255, 255, 0.03);
  border-color: var(--border);
  color: var(--text);
}
.btn-ghost:hover { border-color: var(--blue); }

.btn-lg { padding: 15px 30px; font-size: 1rem; }

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(5, 6, 10, 0.75);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 0;
  gap: 24px;
}

.brand { display: flex; align-items: center; gap: 10px; }
.brand-logo { width: 38px; height: 38px; border-radius: 50%; object-fit: cover; }
.brand-name { font-weight: 800; font-size: 1.15rem; }
.accent { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }

.nav { display: flex; gap: 28px; flex: 1; justify-content: center; }
.nav a { color: var(--text-muted); font-size: 0.95rem; font-weight: 500; }
.nav a:hover { color: var(--text); }

.header-actions { display: flex; gap: 12px; }

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
}
.nav-toggle span { width: 22px; height: 2px; background: var(--text); display: block; }

/* ---------- Hero ---------- */
.hero { position: relative; padding: 84px 0 100px; overflow: hidden; }

.hero-inner {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 56px;
  align-items: center;
  position: relative;
  z-index: 1;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border-radius: 999px;
  border: 1px solid var(--border);
  color: var(--blue);
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  margin-bottom: 22px;
}

.hero h1 {
  font-size: clamp(2.2rem, 4.4vw, 3.3rem);
  margin-bottom: 20px;
}

.hero-subtitle {
  color: var(--text-muted);
  font-size: 1.1rem;
  max-width: 520px;
  margin-bottom: 32px;
}

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

.hero-stats { display: flex; gap: 40px; flex-wrap: wrap; }
.stat { display: flex; flex-direction: column; }
.stat-number {
  font-family: var(--font-mono);
  font-size: 1.8rem;
  font-weight: 800;
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.stat-label { color: var(--text-muted); font-size: 0.8rem; }

.hero-banner-wrap {
  position: relative;
  z-index: 1;
  text-align: center;
}

.hero-title {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(2rem, 5vw, 3.6rem);
  text-align: center;
  max-width: 900px;
  margin: 0 auto 28px;
  text-transform: uppercase;
  letter-spacing: 0.01em;
}

.hero-banner-img {
  width: 100%;
  border-radius: var(--radius);
  box-shadow: var(--shadow), 0 0 0 1px var(--border);
  margin: 20px 0 32px;
}

.hero-actions-banner { justify-content: center; margin-bottom: 0; }

.hero-glow {
  position: absolute;
  top: -160px;
  left: 50%;
  transform: translateX(-50%);
  width: 720px;
  height: 720px;
  background: var(--grad);
  opacity: 0.16;
  filter: blur(140px);
  border-radius: 50%;
  z-index: 0;
}

/* ---------- Glitch text ---------- */
.glitch { position: relative; }
.glitch::before,
.glitch::after {
  content: attr(data-text);
  position: absolute;
  inset: 0;
  opacity: 0.8;
  clip-path: inset(0 0 0 0);
}
.glitch::before {
  color: var(--gold);
  animation: glitchTop 5s infinite linear;
  z-index: -1;
}
.glitch::after {
  color: var(--blue);
  animation: glitchBottom 5s infinite linear;
  z-index: -1;
}
@keyframes glitchTop {
  0%, 92%, 100% { clip-path: inset(0 0 0 0); transform: translate(0, 0); }
  93% { clip-path: inset(0 0 60% 0); transform: translate(-2px, -1px); }
  95% { clip-path: inset(40% 0 20% 0); transform: translate(2px, 1px); }
  97% { clip-path: inset(10% 0 70% 0); transform: translate(-1px, 1px); }
}
@keyframes glitchBottom {
  0%, 92%, 100% { clip-path: inset(0 0 0 0); transform: translate(0, 0); }
  93% { clip-path: inset(60% 0 0 0); transform: translate(2px, 1px); }
  95% { clip-path: inset(20% 0 40% 0); transform: translate(-2px, -1px); }
  97% { clip-path: inset(70% 0 10% 0); transform: translate(1px, -1px); }
}

/* ---------- Hero visual / HUD frame ---------- */
.hero-visual { display: flex; justify-content: center; }

.hud-frame {
  position: relative;
  width: min(360px, 80vw);
  padding: 18px;
}

.hud-corner {
  position: absolute;
  width: 30px;
  height: 30px;
  border: 2px solid var(--blue);
}
.hud-corner.tl { top: 0; left: 0; border-right: none; border-bottom: none; }
.hud-corner.tr { top: 0; right: 0; border-left: none; border-bottom: none; border-color: var(--gold); }
.hud-corner.bl { bottom: 0; left: 0; border-right: none; border-top: none; border-color: var(--gold); }
.hud-corner.br { bottom: 0; right: 0; border-left: none; border-top: none; }

.hero-photo-wrap {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  aspect-ratio: 1 / 1;
  box-shadow: var(--shadow), 0 0 0 1px var(--border);
}

.hero-photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: contrast(1.08) saturate(1.05);
}

/* mitad "circuito digital" sobre el rostro */
.circuit-overlay {
  position: absolute;
  inset: 0;
  width: 50%;
  margin-left: auto;
  background-image:
    linear-gradient(rgba(46, 142, 255, 0.22), rgba(46, 142, 255, 0.22)),
    repeating-linear-gradient(0deg, rgba(46,142,255,0.35) 0 1px, transparent 1px 22px),
    repeating-linear-gradient(90deg, rgba(46,142,255,0.35) 0 1px, transparent 1px 22px);
  mix-blend-mode: screen;
  -webkit-mask-image: linear-gradient(to left, black 55%, transparent 100%);
  mask-image: linear-gradient(to left, black 55%, transparent 100%);
}

.scan-overlay {
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    0deg,
    rgba(255, 255, 255, 0.05) 0px,
    rgba(255, 255, 255, 0.05) 1px,
    transparent 1px,
    transparent 3px
  );
  mix-blend-mode: overlay;
  pointer-events: none;
}

.scanline {
  position: absolute;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--blue), var(--gold), transparent);
  box-shadow: 0 0 12px 2px rgba(46, 142, 255, 0.6);
  animation: scan 3.2s linear infinite;
}
@keyframes scan {
  0% { top: 0%; }
  100% { top: 100%; }
}

.hud-readout {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.04em;
  color: var(--text-muted);
  background: rgba(5, 6, 10, 0.7);
  border: 1px solid var(--border);
  padding: 6px 10px;
  border-radius: 6px;
  position: absolute;
  backdrop-filter: blur(6px);
}
.hud-readout .ok { color: var(--blue); }
.hud-r1 { top: 6px; left: 6px; }
.hud-r2 { bottom: 6px; right: 6px; }

/* ---------- Secciones genéricas ---------- */
.section { padding: 100px 0; position: relative; z-index: 1; }
.section-alt { background: var(--bg-alt); }

.section-tag {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--blue);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 14px;
}
.section-tag.center { display: block; text-align: center; }

.section-title {
  font-size: clamp(1.6rem, 3vw, 2.3rem);
  margin-bottom: 12px;
  text-align: center;
  max-width: 760px;
  margin-left: auto;
  margin-right: auto;
}

.section-subtitle {
  color: var(--text-muted);
  max-width: 560px;
  margin-bottom: 56px;
  text-align: center;
  margin-left: auto;
  margin-right: auto;
}

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

/* ---------- Sobre mí ---------- */
.about-grid {
  display: grid;
  grid-template-columns: 0.8fr 1.2fr;
  gap: 56px;
  align-items: center;
}
.about-photo {
  border-radius: var(--radius);
  box-shadow: var(--shadow), 0 0 0 1px var(--border);
  aspect-ratio: 4 / 5;
  object-fit: cover;
}
.about-copy h2 { font-size: clamp(1.6rem, 3vw, 2.2rem); margin-bottom: 18px; }
.about-copy p { color: var(--text-muted); margin-bottom: 16px; }

.about-grid-reverse .about-visual { order: 2; }
.about-grid-reverse .about-copy { order: 1; }
@media (max-width: 960px) {
  .about-grid-reverse .about-visual,
  .about-grid-reverse .about-copy { order: initial; }
}

/* ---------- Cards ---------- */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 30px 26px;
  transition: transform 0.15s ease, border-color 0.15s ease;
}
.card:hover { transform: translateY(-4px); border-color: rgba(46, 142, 255, 0.4); }

.icon-badge {
  width: 46px;
  height: 46px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
  background: var(--grad);
  font-size: 1.3rem;
  margin-bottom: 18px;
}

.card h3 { margin-bottom: 8px; font-size: 1.1rem; }
.card p { color: var(--text-muted); font-size: 0.95rem; }

/* ---------- Steps ---------- */
.steps { text-align: center; }
.step-number {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--blue);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 4px 12px;
  margin-bottom: 16px;
}
.step h3 { margin-bottom: 8px; font-size: 1.05rem; }
.step p { color: var(--text-muted); font-size: 0.95rem; }

/* ---------- Testimonios ---------- */
.testimonial-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
}
.testimonial-card p { color: var(--text-muted); margin-bottom: 24px; font-style: italic; }
.testimonial-author { display: flex; align-items: center; gap: 12px; }
.testimonial-author div { display: flex; flex-direction: column; font-size: 0.85rem; }
.testimonial-author span { color: var(--text-muted); }
.avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--grad);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.8rem;
  color: #05060a;
}

/* ---------- CTA ---------- */
.cta {
  padding: 110px 0;
  text-align: center;
  background: var(--bg-alt);
  position: relative;
  z-index: 1;
}
.cta h2 { font-size: clamp(1.7rem, 3.2vw, 2.4rem); margin: 14px 0; }
.cta p { color: var(--text-muted); margin-bottom: 32px; max-width: 520px; margin-left: auto; margin-right: auto; }

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--border); padding-top: 64px; position: relative; z-index: 1; }
.footer-inner { display: flex; justify-content: space-between; gap: 48px; flex-wrap: wrap; padding-bottom: 48px; }
.footer-brand { max-width: 280px; }
.footer-brand .brand-logo { margin-bottom: 14px; }
.footer-brand p { color: var(--text-muted); font-size: 0.9rem; }
.footer-links { display: flex; gap: 64px; flex-wrap: wrap; }
.footer-links h4 { font-size: 0.85rem; color: var(--text-muted); margin-bottom: 16px; }
.footer-links a { display: block; color: var(--text-muted); font-size: 0.9rem; padding: 6px 0; }
.footer-links a:hover { color: var(--text); }
.footer-bottom { border-top: 1px solid var(--border); padding: 24px; text-align: center; color: var(--text-muted); font-size: 0.85rem; }

/* ---------- Formulario de contacto ---------- */
.contact-form {
  display: flex;
  flex-direction: column;
  gap: 8px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px;
}

.contact-form label {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-top: 12px;
}

.contact-form input,
.contact-form textarea {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  color: var(--text);
  font-family: var(--font);
  font-size: 0.95rem;
  resize: vertical;
}

.contact-form input:focus,
.contact-form textarea:focus {
  outline: none;
  border-color: var(--blue);
}

.contact-form button { margin-top: 20px; }

.form-note {
  text-align: center;
  color: var(--text-muted);
  font-size: 0.8rem;
  margin-top: 12px;
}

/* ---------- Botón flotante de WhatsApp ---------- */
.whatsapp-float {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 60;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: #25d366;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 24px rgba(37, 211, 102, 0.45);
  animation: whatsappPulse 2.4s infinite;
  transition: transform 0.15s ease;
}
.whatsapp-float:hover { transform: scale(1.08); }

@keyframes whatsappPulse {
  0% { box-shadow: 0 8px 24px rgba(37, 211, 102, 0.45), 0 0 0 0 rgba(37, 211, 102, 0.5); }
  70% { box-shadow: 0 8px 24px rgba(37, 211, 102, 0.45), 0 0 0 14px rgba(37, 211, 102, 0); }
  100% { box-shadow: 0 8px 24px rgba(37, 211, 102, 0.45), 0 0 0 0 rgba(37, 211, 102, 0); }
}

@media (max-width: 768px) {
  .whatsapp-float { bottom: 18px; right: 18px; width: 54px; height: 54px; }
}

/* ---------- Reveal on scroll ---------- */
[data-reveal] { opacity: 0; transform: translateY(24px); transition: opacity 0.6s ease, transform 0.6s ease; }
[data-reveal].is-visible { opacity: 1; transform: translateY(0); }

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
  .hero-inner { grid-template-columns: 1fr; }
  .hero-visual { order: -1; }
  .about-grid { grid-template-columns: 1fr; }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
  .nav, .header-actions { display: none; }
  .nav-toggle { display: flex; }

  .site-header.nav-open .nav {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--bg);
    border-bottom: 1px solid var(--border);
    padding: 20px 24px;
    gap: 16px;
  }
  .site-header.nav-open .header-actions {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: calc(100% + 230px);
    left: 0;
    right: 0;
    background: var(--bg);
    padding: 0 24px 20px;
  }

  .grid-3 { grid-template-columns: 1fr; }
  .hero { padding: 56px 0 72px; }
  .section { padding: 64px 0; }
}
