/* ═══════════════════════════════════════════════
   LAYOUT — nav, hero, hero-stats, footer
═══════════════════════════════════════════════ */

/* ── Navegación principal ── */
#nav {
  position: fixed;
  top: var(--ann-h, 0px);
  left: 0; right: 0;
  z-index: 200;
  transition: background .3s, box-shadow .3s, top .3s ease;
}
#nav.scrolled {
  background: rgb(var(--navy-rgb) / .96);
  backdrop-filter: blur(16px) saturate(1.2);
  box-shadow: 0 1px 0 rgba(255, 255, 255, .06), 0 6px 20px rgb(var(--navy-rgb) / .25);
}
.nav-inner {
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
}
.nav-logo {
  font-family: var(--ffd);
  font-weight: 800;
  font-size: 1.05rem;
  letter-spacing: -.02em;
}
.nav-logo        { color: var(--on-dark); }
.nav-logo strong { color: var(--blue-lt); }
.nav-logo span   { color: var(--on-dark3); }

.nav-links {
  display: flex;
  align-items: center;
  gap: .25rem;
  list-style: none;
}
.nav-links a {
  padding: .45rem .9rem;
  border-radius: 6px;
  font-size: .86rem;
  font-weight: 500;
  color: var(--on-dark2);
  transition: color .2s, background .2s;
}
.nav-links a:hover {
  color: var(--on-dark);
  background: rgba(255, 255, 255, .08);
}
.nav-links .nav-cta {
  padding: .5rem 1.25rem;
  margin-left: .5rem;
  background: var(--blue);
  color: #fff !important;
  border-radius: var(--r);
  font-weight: 700;
  transition: background .2s;
}
.nav-links .nav-cta:hover { background: var(--blue2); }

.nav-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--on-dark);
  padding: .5rem;
}
.nav-toggle svg { width: 22px; height: 22px; }
.nav-toggle:focus-visible { outline: 2px solid var(--blue-lt); outline-offset: 3px; border-radius: 4px; }

/* Menú móvil (overlay) */
.nav-mobile {
  display: none;
  flex-direction: column;
  position: fixed;
  top: var(--ann-h, 0px);
  left: 0; right: 0; bottom: 0;
  z-index: 190;
  background: rgb(var(--navy-rgb) / .985);
  backdrop-filter: blur(12px);
  padding: calc(68px + 1.25rem) 2rem 2rem;
  gap: .5rem;
}
.nav-mobile.open { display: flex; }
.nav-mobile a {
  padding: 1rem;
  border-radius: var(--r);
  font-family: var(--ffd);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--on-dark2);
  border: 1px solid rgba(255, 255, 255, .1);
  transition: color .2s, border-color .2s, background .2s;
}
.nav-mobile a:hover {
  color: var(--on-dark);
  border-color: rgba(255, 255, 255, .25);
}
.nav-mobile .nav-cta-mob {
  color: #fff !important;
  background: var(--blue);
  border-color: var(--blue) !important;
}

/* ── Hero ── */
#inicio {
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding-top: calc(68px + var(--ann-h, 0px));
  position: relative;
  overflow: hidden;
  background: var(--navy);
  color: var(--on-dark);
}

/* Degradado sutil de Azul Ejecutivo (#0F2537) a Azul Tecnológico (#1A66FF) */
.hero-bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse 70% 80% at 100% 100%, rgb(var(--blue-rgb) / .38) 0%, transparent 65%),
    radial-gradient(ellipse 50% 50% at 85% 10%,   rgb(var(--green-rgb) / .07) 0%, transparent 70%),
    linear-gradient(135deg, var(--navy) 0%, var(--navy) 45%, #12345A 100%);
}
.hero-dots {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image: radial-gradient(rgba(255, 255, 255, .07) 1px, transparent 1px);
  background-size: 32px 32px;
  mask-image: radial-gradient(ellipse 80% 80% at 50% 50%, black 30%, transparent 100%);
}

/* Ventana de editor que se escribe sola (decorativa, encima del panel de servicios) */
.hero-side { display: flex; flex-direction: column; gap: 1rem; }
.ht-window {
  background: rgb(10 26 40 / .82);
  border: 1px solid rgba(255, 255, 255, .1);
  border-radius: var(--r2);
  overflow: hidden;
  box-shadow: 0 18px 48px rgb(0 0 0 / .25);
}
.ht-bar {
  display: flex;
  align-items: center;
  gap: .4rem;
  padding: .6rem .9rem;
  border-bottom: 1px solid rgba(255, 255, 255, .07);
}
.ht-bar span { width: 9px; height: 9px; border-radius: 50%; background: rgba(255, 255, 255, .16); }
.ht-bar em {
  margin-left: .6rem;
  font-family: var(--ffm);
  font-size: .7rem;
  font-style: normal;
  color: var(--on-dark3);
}
.ht-code {
  font-family: var(--ffm);
  font-size: .78rem;
  line-height: 1.65;
  color: rgba(255, 255, 255, .72);
  white-space: pre;
  counter-reset: ln;
  height: calc(6 * 1.65em + 1.5rem);  /* 6 líneas visibles; hace scroll como un editor real */
  overflow: hidden;
  padding: .75rem 1rem .75rem 0;
  transition: opacity .6s ease;
}
.ht-code.is-fading { opacity: 0; }
.ht-code .ln { display: block; counter-increment: ln; }
.ht-code .ln::before {
  content: counter(ln);
  display: inline-block;
  width: 2.25rem;
  margin-right: 1rem;
  text-align: right;
  color: rgba(255, 255, 255, .22);
}
.ht-code .kw  { color: var(--blue-lt); }
.ht-code .str { color: var(--green); }
.ht-code .num { color: #fff; }
.ht-code .com { color: rgba(255, 255, 255, .4); font-style: italic; }
.ht-code .caret {
  display: inline-block;
  width: .55em;
  height: 1.1em;
  margin-left: 1px;
  vertical-align: -.2em;
  background: var(--green);
  animation: caretBlink 1s steps(1) infinite;
}
@keyframes caretBlink { 50% { opacity: 0; } }


.hero-inner {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1.15fr .85fr;
  gap: 4rem;
  align-items: center;
}
.hero-content { max-width: 640px; }

.hero-h1 {
  font-family: var(--ffc);
  font-size: clamp(2.3rem, 4.4vw, 3.6rem);
  font-weight: 400;
  line-height: 1.08;
  letter-spacing: -.02em;
  color: var(--on-dark);
  margin-bottom: 1.5rem;
}
.hero-h1 em  { font-style: italic; color: var(--blue-lt); }

/* Presentación personal en la primera pantalla */
.hero-intro {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.5rem;
}
.hero-avatar {
  width: 76px;
  height: 76px;
  flex-shrink: 0;
  border-radius: 50%;
  object-fit: cover;
  background: var(--navy2);
  border: 2px solid rgb(var(--green-rgb) / .6);
}
.hero-intro p { font-size: 1rem; color: var(--on-dark2); line-height: 1.45; max-width: 36ch; }
.hero-intro strong { color: var(--on-dark); }

#inicio .eyebrow         { color: var(--green); }
#inicio .eyebrow::before { background: var(--green); }
#inicio .btn-ghost       { color: var(--on-dark); border-color: rgba(255, 255, 255, .35); }
#inicio .btn-ghost:hover { border-color: var(--on-dark); background: rgba(255, 255, 255, .06); }
#inicio .btn:focus-visible { outline-color: var(--blue-lt); }
#inicio .hero-trust-item     { color: var(--on-dark2); }
#inicio .hero-trust-item svg { color: var(--green); }

.hero-desc {
  font-size: clamp(.95rem, 1.8vw, 1.1rem);
  color: var(--on-dark2);
  max-width: 50ch;
  line-height: 1.8;
  margin-bottom: 2.25rem;
  font-weight: 300;
}
.hero-actions {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 1.25rem;
}

/* Panel de servicios del hero */
.hero-services {
  background: rgb(255 255 255 / .04);
  border: 1px solid rgba(255, 255, 255, .1);
  border-radius: var(--r2);
  padding: 1.25rem 1.5rem;
}
.hsp-label {
  font-family: var(--ffm);
  font-size: .68rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--on-dark3);
  margin-bottom: .75rem;
}
.hsp-list { display: flex; flex-direction: column; }
.hsp-row {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem .75rem;
  margin: 0 -.75rem;
  border-radius: var(--r);
  border-bottom: 1px solid rgba(255, 255, 255, .08);
  transition: background .2s;
}
.hsp-row:last-child { border-bottom: none; }
.hsp-row:hover { background: rgba(255, 255, 255, .06); }
.hsp-row:focus-visible { outline: 2px solid var(--blue-lt); outline-offset: 2px; }


.hsp-row > span:nth-child(2) { flex: 1; min-width: 0; }
.hsp-name { display: block; font-weight: 700; font-size: .95rem; color: var(--on-dark); line-height: 1.3; }

.hsp-arrow { color: var(--on-dark3); transition: transform .2s, color .2s; }
.hsp-row:hover .hsp-arrow { transform: translateX(3px); color: var(--green); }
.hsp-foot {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(255, 255, 255, .1);
  font-size: .78rem;
  color: var(--on-dark2);
}
.hsp-foot strong { color: var(--green); font-weight: 800; }

/* ── Footer ── */
footer {
  background: var(--navy3);
  padding: 2.5rem 0;
  border-top: 1px solid rgba(255, 255, 255, .06);
}
.foot-inner {
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
}
.foot-logo {
  font-family: var(--ffd);
  font-weight: 800;
  font-size: 1rem;
  letter-spacing: -.02em;
  color: var(--on-dark);
}
.foot-logo strong { color: var(--blue-lt); }
.foot-logo span   { color: var(--on-dark3); }

.foot-links { display: flex; gap: 1.5rem; }
.foot-links a {
  font-size: .82rem;
  color: var(--on-dark2);
  transition: color .2s;
}
.foot-links a:hover { color: var(--on-dark); }

.foot-copy { font-size: .8rem; color: var(--on-dark3); }
