/* ==========================================================================
   Nezxu — negro + blanco + azul neon. Profesional y moderno, con UN detalle
   de terminal dinamica (visual, sin jerga de programacion) y fotografia real
   con tratamiento duotono.
   ========================================================================== */

:root {
  --bg: #000000;
  --bg-alt: #0a0a0c;
  --bg-card: #0c0c0f;
  --line: rgba(255,255,255,0.10);
  --line-soft: rgba(255,255,255,0.06);
  --fg: #f5f6f8;
  --muted: #9a9ca6;
  --muted-2: #63656e;
  --accent: #00d9ff;
  --accent-2: #2d7dfb;
  --accent-soft: rgba(0,217,255,0.12);
  --accent-line: rgba(0,217,255,0.4);
  --accent-glow: rgba(0,217,255,0.55);
  --radius: 16px;
  --font-display: 'Space Grotesk', 'Inter', system-ui, sans-serif;
  --font-body: 'Inter', system-ui, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, Menlo, monospace;
}

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-body);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 { font-family: var(--font-display); font-weight: 700; margin: 0 0 .5em; line-height: 1.15; letter-spacing: -.01em; }
p { margin: 0 0 1em; color: var(--muted); }
a { color: inherit; text-decoration: none; }
ul { list-style: none; margin: 0; padding: 0; }
button { font-family: inherit; }

.grad {
  background: linear-gradient(100deg, var(--accent-2), var(--accent));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 0 18px var(--accent-glow));
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: .55rem;
  font-family: var(--font-mono);
  font-size: .78rem;
  color: var(--accent);
  font-weight: 500;
  margin-bottom: 1rem;
}
.eyebrow .dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 10px 2px var(--accent-glow);
  animation: pulse-dot 1.8s ease-in-out infinite;
}
@keyframes pulse-dot { 0%, 100% { opacity: 1; transform: scale(1); } 50% { opacity: .4; transform: scale(.7); } }

main, header, footer { position: relative; z-index: 2; }

/* ---------- ambient background fx ---------- */
#fxCanvas {
  position: fixed; inset: 0; z-index: 0;
  width: 100%; height: 100%;
  pointer-events: none;
  opacity: .55;
}

/* ---------- preloader ---------- */
.preloader { display: none; }
.js-ready .preloader {
  display: flex; align-items: center; justify-content: center;
  position: fixed; inset: 0; z-index: 999;
  background: #000;
  flex-direction: column; gap: 1.4rem;
  transition: opacity .5s ease, visibility .5s ease;
}
.preloader.hide { opacity: 0; visibility: hidden; pointer-events: none; }
.preloader-bar { width: 220px; height: 2px; background: var(--line); border-radius: 2px; overflow: hidden; }
.preloader-fill { display: block; height: 100%; width: 0%; background: var(--accent); box-shadow: 0 0 12px var(--accent-glow); transition: width .3s ease; }
.preloader-status { font-family: var(--font-mono); font-size: .78rem; color: var(--muted); min-height: 1.2em; }
.preloader .brand-logo { font-size: 1.5rem; }

/* ---------- header ---------- */
.nav {
  position: sticky; top: 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem;
  padding: 1.1rem clamp(1.2rem, 4vw, 3rem);
  background: rgba(0,0,0,.6);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color .3s ease;
}
.nav.scrolled { border-bottom-color: var(--line); }

.brand-logo { display: inline-flex; align-items: baseline; gap: .35rem; font-family: var(--font-mono); }
.brand-mark { color: var(--accent); font-weight: 700; font-size: 1.15em; text-shadow: 0 0 14px var(--accent-glow); }
.brand-cursor { display: inline-block; animation: blink 1s step-end infinite; color: var(--fg); }
.brand-word { color: var(--fg); font-weight: 700; letter-spacing: -.01em; }
@keyframes blink { 0%, 100% { opacity: 1; } 50% { opacity: 0; } }

.nav-links { display: flex; align-items: center; gap: 2.2rem; }
.nav-links a {
  font-family: var(--font-display);
  font-size: .92rem; font-weight: 500; color: var(--muted);
  position: relative; padding-bottom: 4px;
  transition: color .2s ease;
}
.nav-links a::after {
  content: ""; position: absolute; left: 0; right: 100%; bottom: 0;
  height: 1px; background: var(--accent); box-shadow: 0 0 8px var(--accent-glow);
  transition: right .25s ease;
}
.nav-links a:hover { color: var(--fg); }
.nav-links a:hover::after { right: 0; }
.nav-links a.active { color: var(--fg); }
.nav-links a.active::after { right: 0; }

.nav-actions { display: flex; align-items: center; gap: 1rem; }
.lang-toggle {
  display: inline-flex; align-items: center; gap: .35rem;
  font-family: var(--font-mono); font-size: .78rem; font-weight: 500;
  color: var(--muted-2);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: .4rem .8rem;
  transition: border-color .2s ease;
}
.lang-toggle:hover { border-color: var(--accent-line); }
.lang-toggle .lang-sep { color: var(--muted-2); opacity: .5; }
.lang-toggle .is-active { color: var(--accent); font-weight: 700; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  padding: .8rem 1.6rem;
  border-radius: 999px;
  font-family: var(--font-display);
  font-weight: 600; font-size: .92rem;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform .2s ease, background .2s ease, border-color .2s ease, color .2s ease, box-shadow .2s ease;
  white-space: nowrap;
}
.btn-primary { background: var(--accent); color: #000; box-shadow: 0 0 0 0 var(--accent-glow); }
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 12px 30px -10px var(--accent-glow); }
.btn-ghost { background: transparent; border-color: var(--line); color: var(--fg); }
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); }
.btn-lg { padding: 1rem 1.9rem; font-size: .98rem; }
.btn-block { width: 100%; }

.nav-toggle {
  display: none; flex-direction: column; justify-content: center; gap: 5px;
  width: 40px; height: 40px; border: none; background: none; cursor: pointer;
}
.nav-toggle span { display: block; width: 22px; height: 2px; background: var(--fg); margin: 0 auto; }

/* ---------- hero ---------- */
.hero {
  position: relative;
  padding: clamp(2.5rem, 7vh, 5rem) clamp(1.2rem, 4vw, 3rem) 6.5rem;
}
.hero-video-bg {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  opacity: .1;
  filter: grayscale(.5);
}
.hero-video-fade { position: absolute; inset: 0; background: linear-gradient(180deg, var(--bg) 0%, rgba(0,0,0,.7) 45%, var(--bg) 100%); }

.hero-inner {
  position: relative; z-index: 1;
  display: grid; grid-template-columns: 1.05fr .95fr; align-items: center; gap: 3.5rem;
  max-width: 1260px; margin: 0 auto; width: 100%;
}

.hero-title { font-size: clamp(2.3rem, 4.6vw, 3.6rem); color: var(--fg); }
.hero-sub { font-size: 1.08rem; max-width: 46ch; }
.hero-cta { display: flex; gap: 1rem; flex-wrap: wrap; margin-top: 1.7rem; }

/* photo frame w/ duotone treatment, reused across sections */
.photo-frame {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--line);
}
.photo-frame img {
  display: block; width: 100%; height: 100%; object-fit: cover;
  filter: grayscale(1) contrast(1.12) brightness(.85);
}
.photo-frame::after {
  content: "";
  position: absolute; inset: 0;
  background:
    linear-gradient(180deg, rgba(0,0,0,.15), rgba(0,0,0,.55)),
    radial-gradient(ellipse at 30% 20%, rgba(0,217,255,.22), transparent 60%);
  mix-blend-mode: normal;
}

.hero-visual { position: relative; }
.hero-photo { aspect-ratio: 4 / 3.1; box-shadow: 0 40px 80px -40px rgba(0,217,255,.25); }

/* floating live terminal card overlapping the hero photo -- types decorative
   code lines, then closes each block with a plain-language checkmark result */
.status-card {
  position: absolute; left: -8%; bottom: -9%; width: 80%;
  background: rgba(8,10,14,.92);
  backdrop-filter: blur(10px);
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: 0 20px 50px -15px rgba(0,0,0,.6), 0 0 50px -18px var(--accent-glow);
  z-index: 2;
}
.status-bar {
  display: flex; align-items: center; gap: .4rem;
  padding: .55rem .8rem;
  background: rgba(255,255,255,.03);
  border-bottom: 1px solid var(--line);
  border-radius: 12px 12px 0 0;
}
.status-dot-chrome { width: 8px; height: 8px; border-radius: 50%; background: #2a2a2e; }
.status-title { margin-left: .5rem; font-family: var(--font-mono); font-size: .7rem; color: var(--muted-2); }
.status-live { margin-left: auto; display: inline-flex; align-items: center; gap: .35rem; font-family: var(--font-mono); font-size: .66rem; color: var(--accent); }
.status-live::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 8px 2px var(--accent-glow); animation: pulse-dot 1.8s ease-in-out infinite; }
.status-body {
  padding: .8rem .95rem;
  font-family: var(--font-mono); font-size: .74rem; line-height: 1.55;
  height: 200px;
  display: flex; flex-direction: column; justify-content: flex-end;
  overflow: hidden;
  border-radius: 0 0 12px 12px;
}
.term-line {
  white-space: pre-wrap; word-break: break-word;
  color: var(--muted);
  opacity: 0; transform: translateY(6px);
  transition: opacity .3s ease, transform .3s ease;
}
.term-line.show { opacity: 1; transform: translateY(0); }
.term-line.cmd { color: var(--fg); }
.term-line.cmd .term-caret { color: var(--accent); margin-right: .4rem; }
.term-line.done { color: var(--accent); font-weight: 600; }
.term-cursor { display: inline-block; width: .5em; height: 1em; background: var(--accent); vertical-align: text-bottom; animation: blink 1s step-end infinite; }

/* ---------- nosotros ---------- */
.nosotros {
  display: grid; grid-template-columns: .85fr 1.15fr; gap: 3.5rem; align-items: center;
  padding: 6.5rem clamp(1.2rem, 4vw, 3rem);
  max-width: 1260px; margin: 0 auto;
}
.nosotros h2 { font-size: clamp(1.6rem, 3.2vw, 2.3rem); color: var(--fg); }
.nosotros-p { font-size: 1rem; max-width: 58ch; }
.nosotros-photo { aspect-ratio: 3.4/4; }
.values-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.4rem; margin-top: 1.8rem; }
.value h3 { font-size: .96rem; color: var(--fg); margin-bottom: .35rem; }
.value p { font-size: .84rem; margin: 0; }
.value::before {
  content: ""; display: block; width: 26px; height: 2px;
  background: var(--accent); box-shadow: 0 0 8px var(--accent-glow);
  margin-bottom: .7rem;
}

/* ---------- ticker ---------- */
.ticker {
  border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
  overflow: hidden; white-space: nowrap;
  background: var(--bg-alt);
  padding: 1rem 0;
}
.ticker-track { display: inline-flex; gap: 1.4rem; animation: marquee 28s linear infinite; }
.ticker-track span {
  font-family: var(--font-display); font-weight: 600; font-size: .95rem;
  letter-spacing: .03em; color: var(--muted);
}
.ticker-track span.dot { color: var(--accent); font-weight: 400; }
@keyframes marquee { from { transform: translateX(0); } to { transform: translateX(-50%); } }

/* ---------- reveal ---------- */
.js-ready .reveal { opacity: 0; transform: translateY(26px); transition: opacity .7s ease, transform .7s ease; transition-delay: var(--delay, 0ms); }
.reveal.in { opacity: 1; transform: translateY(0); }
@media (prefers-reduced-motion: reduce) {
  .reveal { transition: none; opacity: 1; transform: none; }
  .brand-cursor, .ticker-track, .eyebrow .dot { animation: none !important; }
}

/* ---------- sections ---------- */
.section-head { max-width: 640px; margin: 0 auto 3rem; }
.section-head h2 { font-size: clamp(1.6rem, 3.2vw, 2.3rem); color: var(--fg); }
.section-sub { font-size: 1.02rem; }

.servicios, .proceso, .stats-wrap { padding: 6.5rem clamp(1.2rem, 4vw, 3rem); max-width: 1260px; margin: 0 auto; }

/* ---------- service cards (real photos) ---------- */
.services-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 1.4rem; }
.service-card {
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  transition: border-color .25s ease, transform .25s ease, box-shadow .25s ease;
}
.service-card:hover { border-color: var(--accent-line); transform: translateY(-4px); box-shadow: 0 20px 40px -25px var(--accent-glow); }
.service-photo { position: relative; aspect-ratio: 16/10; }
.service-photo .photo-frame { border: none; border-radius: 0; height: 100%; }
.service-tag {
  position: absolute; top: .7rem; left: .7rem; z-index: 1;
  font-family: var(--font-mono); font-size: .68rem; color: var(--accent);
  background: rgba(0,0,0,.55); border: 1px solid var(--accent-line);
  padding: .2rem .55rem; border-radius: 999px;
  backdrop-filter: blur(4px);
}
.service-body { padding: 1.2rem 1.3rem 1.4rem; }
.service-body h3 { font-size: 1.08rem; color: var(--fg); margin-bottom: .4rem; }
.service-body p { font-size: .9rem; margin: 0; }

/* ---------- showcase ---------- */
.showcase {
  display: grid; grid-template-columns: 1fr 1fr; gap: 3.5rem; align-items: center;
  padding: 6.5rem clamp(1.2rem, 4vw, 3rem);
  max-width: 1260px; margin: 0 auto;
}
.showcase h2 { font-size: clamp(1.6rem, 3.2vw, 2.4rem); color: var(--fg); }
.showcase-list li {
  display: flex; align-items: flex-start; gap: .75rem;
  padding: .6rem 0; color: var(--fg); font-size: 1rem; font-family: var(--font-body);
}
.showcase-list .check {
  color: var(--accent); font-weight: 700;
  border-radius: 50%;
  width: 22px; height: 22px; flex: none;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: .78rem;
  border: 1px solid var(--accent);
  box-shadow: 0 0 10px -2px var(--accent-glow);
  margin-top: .1rem;
}
.showcase-photo { aspect-ratio: 4/3.3; }

/* ---------- stats ---------- */
.stats-wrap { max-width: 1100px; }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 1.5rem; padding: 2.6rem 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.stat { text-align: center; }
.stat-num, .stat-suffix { font-family: var(--font-display); font-weight: 700; font-size: clamp(2.2rem, 4vw, 3rem); color: var(--fg); }
.stat-suffix { color: var(--accent); text-shadow: 0 0 16px var(--accent-glow); }
.stat-label { display: block; margin-top: .3rem; color: var(--muted); font-size: .9rem; }

/* ---------- timeline ---------- */
.timeline { max-width: 780px; margin: 0 auto; border-left: 1px solid var(--line); }
.tl-item { position: relative; padding: 0 0 2.5rem 2.1rem; }
.tl-item:last-child { padding-bottom: 0; }
.tl-num {
  position: absolute; left: -1px; top: 0; transform: translateX(-50%);
  font-family: var(--font-display); font-weight: 700; font-size: .82rem; color: #000;
  background: var(--accent);
  width: 34px; height: 34px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 0 16px var(--accent-glow);
}
.tl-item h3 { font-size: 1.08rem; color: var(--fg); }
.tl-item p { font-size: .92rem; max-width: 54ch; margin: 0; }

/* ---------- CTA banner ---------- */
.cta-banner {
  position: relative;
  margin: 6.5rem clamp(1.2rem, 4vw, 3rem);
  padding: 5rem 2rem;
  border-radius: 28px;
  text-align: center;
  border: 1px solid var(--line);
  background: radial-gradient(ellipse at 50% 0%, rgba(0,217,255,.14), transparent 60%), var(--bg-card);
  overflow: hidden;
}
.cta-banner h2 { font-size: clamp(1.9rem, 4vw, 2.8rem); }
.cta-banner .btn { margin-top: 1.2rem; }

/* ---------- contact ---------- */
.contacto { display: grid; grid-template-columns: 1fr 1fr; gap: 3rem; padding: 6.5rem clamp(1.2rem, 4vw, 3rem) 7rem; max-width: 1150px; margin: 0 auto; }
.contacto h2 { font-size: clamp(1.6rem, 3.2vw, 2.3rem); color: var(--fg); }
.contact-channels { display: flex; flex-direction: column; gap: .9rem; margin-top: 1.6rem; }
.contact-channel {
  display: inline-flex; align-items: center; gap: .7rem;
  padding: .8rem 1.1rem;
  border: 1px solid var(--line); border-radius: 12px;
  color: var(--fg); font-weight: 500; width: fit-content;
  transition: border-color .2s ease, color .2s ease;
}
.contact-channel svg { width: 19px; height: 19px; color: var(--accent); }
.contact-channel:hover { border-color: var(--accent-line); color: var(--accent); }

.contact-form { background: var(--bg-card); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.8rem; display: flex; flex-direction: column; gap: 1.1rem; }
.form-row { display: flex; flex-direction: column; gap: .4rem; }
.form-row label { font-size: .85rem; color: var(--muted); }
.form-row .optional { font-weight: 400; opacity: .7; }
.form-row input, .form-row textarea {
  background: rgba(255,255,255,.03);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: .75rem .9rem;
  color: var(--fg);
  font-family: inherit; font-size: .95rem;
  min-height: 44px;
  resize: vertical;
  transition: border-color .2s ease, box-shadow .2s ease;
}
.form-row input:focus, .form-row textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.form-honeypot { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.btn-spinner { width: 16px; height: 16px; border-radius: 50%; border: 2px solid rgba(0,0,0,.3); border-top-color: #000; display: none; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.contact-form.loading .btn-spinner { display: inline-block; }
.contact-form.loading .btn-label { opacity: .7; }

.form-feedback { font-size: .88rem; min-height: 1.2em; margin: 0; }
.form-feedback.ok { color: var(--accent); }
.form-feedback.err { color: #ff6b6b; }

/* ---------- footer ---------- */
.footer { border-top: 1px solid var(--line); padding: 3.2rem clamp(1.2rem, 4vw, 3rem); display: flex; flex-direction: column; align-items: center; gap: .6rem; text-align: center; }
.footer-tag { color: var(--muted); font-size: .9rem; }
.footer-meta { display: flex; gap: 1rem; font-size: .8rem; color: var(--muted-2); }

/* ---------- responsive ---------- */
@media (max-width: 980px) {
  .hero-inner { grid-template-columns: 1fr; text-align: center; }
  .hero-cta { justify-content: center; }
  .hero-sub { margin-left: auto; margin-right: auto; }
  .hero-visual { order: -1; max-width: 420px; margin: 0 auto 2rem; }
  .status-card { left: 4%; width: 92%; }
  .showcase { grid-template-columns: 1fr; text-align: left; }
  .showcase-photo { order: -1; }
  .nosotros { grid-template-columns: 1fr; text-align: left; }
  .nosotros-photo { order: -1; max-width: 420px; aspect-ratio: 16/10; }
  .contacto { grid-template-columns: 1fr; }
  .contact-info { text-align: center; }
  .contact-channels { align-items: center; }
}

@media (max-width: 760px) {
  .nav-links, .btn-nav { display: none; }
  .nav-toggle { display: flex; }
  .nav.open .nav-links {
    display: flex; flex-direction: column; align-items: flex-start; gap: 1.2rem;
    position: absolute; top: 100%; left: 0; right: 0;
    background: rgba(0,0,0,.97);
    padding: 1.5rem clamp(1.2rem, 4vw, 3rem) 2rem;
    border-bottom: 1px solid var(--line);
  }
  .nav.open .btn-nav { display: inline-flex; margin: 0 clamp(1.2rem, 4vw, 3rem) 1.2rem; }
  .nav.open { flex-wrap: wrap; }
  .status-card { position: static; width: 100%; margin-top: 1rem; }
  .values-grid { grid-template-columns: 1fr; gap: 1.2rem; }
}
