/* Navegación, hero, encabezados de sección, contacto y footer */

/* NAV */
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--nav-h);
  background: rgba(7, 18, 38, .72);
  backdrop-filter: saturate(160%) blur(14px);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
  border-bottom: 1px solid transparent;
  transition: background-color .3s var(--ease), border-color .3s var(--ease);
}
.nav.is-scrolled { background: rgba(7, 18, 38, .92); border-bottom-color: rgba(255, 255, 255, .08); }

.nav__inner { height: 100%; display: flex; align-items: center; justify-content: space-between; gap: 24px; }

.nav__brand { display: flex; align-items: center; gap: 12px; color: #fff; font-weight: 600; letter-spacing: -.01em; }
.nav__mark {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 9px;
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .02em;
  background: linear-gradient(135deg, var(--blue-500), var(--navy-700));
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .18);
}

.nav__list { display: flex; align-items: center; gap: 2px; }
.nav__list a {
  position: relative;
  display: block;
  padding: 8px 12px;
  font-size: .9rem;
  font-weight: 500;
  color: #b9c6df;
  border-radius: 8px;
  transition: color .2s var(--ease);
}
.nav__list a:hover, .nav__list a.is-active { color: #fff; }
.nav__list a:not(.nav__cta)::after {
  content: "";
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 3px;
  height: 2px;
  background: var(--blue-400);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .3s var(--ease);
}
.nav__list a.is-active::after, .nav__list a:not(.nav__cta):hover::after { transform: scaleX(1); }
.nav__list .nav__cta { margin-left: 8px; padding: 8px 18px; color: #fff; background: var(--blue-500); border-radius: 999px; }
.nav__list .nav__cta:hover { background: #2a63cc; }

.nav__toggle { display: none; width: 44px; height: 44px; padding: 0; background: none; border: 0; border-radius: 10px; cursor: pointer; }
.nav__bars, .nav__bars::before, .nav__bars::after {
  display: block;
  width: 22px;
  height: 2px;
  margin: auto;
  background: #fff;
  border-radius: 2px;
  transition: transform .3s var(--ease), background-color .3s var(--ease);
}
.nav__bars { position: relative; }
.nav__bars::before, .nav__bars::after { content: ""; position: absolute; left: 0; }
.nav__bars::before { top: -7px; }
.nav__bars::after { top: 7px; }
.nav__toggle[aria-expanded="true"] .nav__bars { background: transparent; }
.nav__toggle[aria-expanded="true"] .nav__bars::before { transform: translateY(7px) rotate(45deg); }
.nav__toggle[aria-expanded="true"] .nav__bars::after { transform: translateY(-7px) rotate(-45deg); }

@media (max-width: 1120px) {
  .nav__toggle { display: block; }
  .nav__menu {
    position: absolute;
    top: var(--nav-h);
    left: 0;
    right: 0;
    padding: 12px 24px 24px;
    background: rgba(7, 18, 38, .97);
    border-bottom: 1px solid rgba(255, 255, 255, .08);
    visibility: hidden;
    opacity: 0;
    transform: translateY(-8px);
    transition: opacity .25s var(--ease), transform .25s var(--ease), visibility .25s;
  }
  .nav__menu.is-open { visibility: visible; opacity: 1; transform: none; }
  .nav__list { flex-direction: column; align-items: stretch; gap: 0; }
  .nav__list a { padding: 14px 4px; font-size: 1rem; border-bottom: 1px solid rgba(255, 255, 255, .07); border-radius: 0; }
  .nav__list a::after { display: none; }
  .nav__list .nav__cta { margin: 16px 0 0; padding: 14px; text-align: center; border: 0; }
}

/* HERO */
.hero {
  position: relative;
  overflow: hidden;
  margin-top: calc(var(--nav-h) * -1);
  padding: calc(var(--nav-h) + 72px) 0 56px;
  color: #cfdbf2;
  background:
    radial-gradient(900px 520px at 85% 25%, rgba(47, 111, 228, .28), transparent 65%),
    radial-gradient(700px 500px at 0% 100%, rgba(27, 56, 102, .6), transparent 70%),
    linear-gradient(160deg, var(--navy-950), var(--navy-900) 55%, var(--navy-800));
}
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, .035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, .035) 1px, transparent 1px);
  background-size: 64px 64px;
  -webkit-mask-image: radial-gradient(ellipse 34% 70% at 78% 42%, #000 10%, transparent 100%);
  mask-image: radial-gradient(ellipse 34% 70% at 78% 42%, #000 10%, transparent 100%);
  pointer-events: none;
}

.hero__net { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; pointer-events: none; }
.net-lines path { fill: none; stroke: rgba(130, 170, 240, .4); stroke-width: 1.4; stroke-linecap: round; }
.net-nodes circle { fill: var(--blue-400); opacity: .75; animation: pulse 5s ease-in-out infinite; }
.net-nodes circle:nth-child(3n) { animation-delay: -1.6s; }
.net-nodes circle:nth-child(3n + 1) { animation-delay: -3.2s; }
@keyframes pulse { 0%, 100% { opacity: .35; } 50% { opacity: .9; } }

.hero__grid { position: relative; display: grid; grid-template-columns: 1.15fr .85fr; align-items: center; gap: 48px; }

.eyebrow {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 18px;
  font-family: var(--font-mono);
  font-size: .8rem;
  font-weight: 500;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--blue-500);
}
.eyebrow span { padding-right: 12px; border-right: 1px solid currentColor; }
.hero .eyebrow::before { content: ""; width: 28px; height: 1px; background: currentColor; }
.eyebrow--light { color: var(--blue-400); }

.hero__title { font-size: clamp(2.7rem, 6.2vw, 4.9rem); font-weight: 700; line-height: 1.02; letter-spacing: -.035em; color: #fff; }
.hero__title span { display: block; background: linear-gradient(90deg, #fff, #9fc2ff); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero__role { margin-top: 22px; font-size: clamp(1.1rem, 2vw, 1.4rem); font-weight: 500; color: #fff; letter-spacing: -.01em; }
.hero__stack { margin-top: 8px; font-size: 1rem; color: var(--blue-400); font-weight: 500; }
.hero__stack i { margin: 0 6px; font-style: normal; color: rgba(255, 255, 255, .3); }
.hero__lead { max-width: 560px; margin-top: 22px; font-size: 1.05rem; color: #aebcd8; }
.hero__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-top: 34px; }

.hero__visual { display: grid; place-items: center; min-width: 0; }
.orbit { position: relative; width: min(100%, 480px); aspect-ratio: 1; }
.portrait { position: absolute; top: 50%; left: 50%; width: 66%; aspect-ratio: 1; transform: translate(-50%, -50%); }
.portrait__img {
  position: absolute;
  inset: 8%;
  width: 84%;
  height: 84%;
  object-fit: cover;
  object-position: 50% 12%;
  border-radius: 50%;
  border: 3px solid rgba(255, 255, 255, .9);
  box-shadow: 0 24px 60px rgba(0, 0, 0, .45);
  background: var(--navy-800);
}
.portrait__ring { position: absolute; border-radius: 50%; border: 1px solid rgba(130, 170, 240, .3); }
.portrait__ring--1 { inset: 0; }
.portrait__ring--2 { inset: -9%; border-style: dashed; border-color: rgba(130, 170, 240, .16); animation: spin 90s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.orbit__tag {
  position: absolute;
  transform: translate(-50%, -50%);
  padding: 7px 14px;
  font-family: var(--font-mono);
  font-size: .75rem;
  letter-spacing: .04em;
  white-space: nowrap;
  color: #e6efff;
  background: rgba(17, 38, 74, .92);
  border: 1px solid rgba(130, 170, 240, .35);
  border-radius: 999px;
  pointer-events: none;
}

.hero__facts {
  position: relative;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  margin-top: 64px;
  padding-top: 28px;
  border-top: 1px solid rgba(255, 255, 255, .1);
}
.hero__facts li { display: flex; flex-direction: column; gap: 2px; }
.hero__facts strong { font-size: 1.7rem; font-weight: 700; letter-spacing: -.02em; color: #fff; }
.hero__facts span { font-size: .88rem; line-height: 1.4; color: #8fa3c7; }

@media (max-width: 900px) {
  .hero { padding-top: calc(var(--nav-h) + 40px); }
  .hero__grid { grid-template-columns: 1fr; gap: 32px; }
  .hero__visual { order: -1; justify-items: start; }
  .orbit { width: min(100%, 300px); }
  .hero__facts { grid-template-columns: repeat(2, 1fr); margin-top: 48px; }
  .orbit__tag { display: none; }
  .hero::before { -webkit-mask-image: radial-gradient(ellipse 80% 22% at 50% 14%, #000 10%, transparent 100%); mask-image: radial-gradient(ellipse 80% 22% at 50% 14%, #000 10%, transparent 100%); }
}
@media (max-width: 520px) {
  .container { width: min(100% - 40px, var(--container)); }
  .hero__actions .btn--primary, .hero__actions .btn--ghost { flex: 1 1 100%; }
  .hero__actions .btn--link { flex: 1 1 100%; border: 1px solid rgba(255, 255, 255, .14); }
  .orbit { width: min(100%, 240px); }
  .net-extra { display: none; }
}

/* SECCIONES */
.section { padding: clamp(72px, 10vw, 120px) 0; }
.section--tint { background: var(--bg-tint); }

.section__head { max-width: 860px; margin-bottom: 56px; }
.section__head h2 { font-size: clamp(1.9rem, 4vw, 2.9rem); font-weight: 700; }
.section__head h2 em { font-style: normal; color: var(--blue-500); }
.section__head--light h2 { color: #fff; }
.section__sub { margin-top: 16px; max-width: 620px; color: #9fb0cf; }

/* CONTACTO */
.contact {
  position: relative;
  overflow: hidden;
  padding: clamp(72px, 10vw, 110px) 0;
  background:
    radial-gradient(700px 420px at 90% 0%, rgba(47, 111, 228, .28), transparent 70%),
    linear-gradient(160deg, var(--navy-900), var(--navy-950));
}
.contact .section__head { margin-bottom: 40px; }
.contact__grid {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  align-items: center;
  gap: 40px;
  padding: 28px;
  background: rgba(255, 255, 255, .04);
  border: 1px solid rgba(255, 255, 255, .1);
  border-radius: 20px;
}
.contact__list { display: grid; gap: 4px; }
.crow {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 12px;
  border-radius: 14px;
  transition: background-color .25s var(--ease);
}
.crow:hover { background: rgba(255, 255, 255, .05); }
.crow .icon { width: 46px; height: 46px; padding: 12px; color: var(--blue-400); background: rgba(91, 155, 255, .12); border-radius: 12px; transition: background-color .25s var(--ease), color .25s var(--ease); }
.crow:hover .icon { color: #fff; background: var(--blue-500); }
.crow__t { min-width: 0; }
.crow__l { display: block; font-family: var(--font-mono); font-size: .74rem; letter-spacing: .12em; text-transform: uppercase; color: #8296bb; }
.crow__v { display: block; font-size: clamp(1.02rem, 2.2vw, 1.3rem); font-weight: 600; color: #fff; overflow-wrap: anywhere; }
.crow__d { display: block; margin-top: 2px; font-size: .88rem; line-height: 1.45; color: #8fa3c7; }
.contact__actions { display: grid; gap: 12px; }
.contact__actions .btn { width: 100%; }

/* Vista previa contextual */
.has-preview { position: relative; }
.preview {
  position: absolute;
  left: 12px;
  bottom: 100%;
  z-index: 20;
  display: none;
  flex-direction: column;
  gap: 2px;
  width: max-content;
  max-width: min(300px, calc(100vw - 48px));
  margin-bottom: 8px;
  padding: 12px 16px;
  font-size: .85rem;
  line-height: 1.4;
  color: #cfdbf2;
  background: rgba(7, 18, 38, .97);
  border: 1px solid rgba(130, 170, 240, .3);
  border-radius: 12px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, .45);
  opacity: 0;
  visibility: hidden;
  transform: translateY(6px);
  transition: opacity .2s var(--ease), transform .2s var(--ease), visibility .2s;
  pointer-events: none;
}
.preview strong { font-size: .72rem; font-weight: 500; letter-spacing: .12em; text-transform: uppercase; font-family: var(--font-mono); color: var(--blue-400); }
.preview__v { font-weight: 600; color: #fff; overflow-wrap: anywhere; }
.preview__h { color: #9fb0cf; }
.has-preview--end .preview { left: auto; right: 0; }
@media (hover: hover) and (pointer: fine) {
  .preview { display: flex; }
  .has-preview:hover > .preview, .has-preview:focus-within > .preview { opacity: 1; visibility: visible; transform: none; pointer-events: auto; }
  .has-preview.is-menu-open > .preview { opacity: 0; visibility: hidden; }
}

/* Menú de WhatsApp (solo escritorio) */
.wa-menu {
  position: absolute;
  top: calc(100% + 8px);
  left: 12px;
  z-index: 30;
  display: grid;
  gap: 4px;
  width: min(320px, calc(100vw - 48px));
  padding: 8px;
  background: rgba(7, 18, 38, .98);
  border: 1px solid rgba(130, 170, 240, .35);
  border-radius: 14px;
  box-shadow: 0 20px 48px rgba(0, 0, 0, .5);
}
.wa-menu[hidden] { display: none; }
.has-preview--end .wa-menu { left: auto; right: 0; }
.wa-menu__title { padding: 6px 10px 2px; font-family: var(--font-mono); font-size: .72rem; letter-spacing: .12em; text-transform: uppercase; color: var(--blue-400); }
.wa-menu a { display: block; padding: 10px 12px; border-radius: 10px; color: #fff; font-weight: 600; transition: background-color .2s var(--ease); }
.wa-menu a:hover { background: rgba(255, 255, 255, .08); }
.wa-menu a small { display: block; font-weight: 400; font-size: .82rem; color: #9fb0cf; }

@media (max-width: 820px) {
  .contact__grid { grid-template-columns: 1fr; gap: 24px; padding: 18px; }
  .crow { padding: 10px 6px; }
  .contact__actions .btn { min-height: 52px; }
}

/* FOOTER */
.footer { padding: 32px 0; background: var(--navy-950); color: #8296bb; border-top: 1px solid rgba(255, 255, 255, .06); }
.footer__inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 24px; }
.footer__name { font-weight: 600; color: #fff; }
.footer__role, .footer__copy { font-size: .9rem; }
