/* ============================================================
   Mi Espacio Net — Hoja de estilos corporativa
   Identidad: azul corporativo, aire visual, jerarquía tipográfica
   ============================================================ */

:root {
  --blue: #1a56db;
  --blue-light: #3b82f6;
  --blue-dark: #0f2b52;
  --navy: #0a1f3d;
  --white: #ffffff;
  --gray-50: #f5f7fb;
  --gray-100: #e9edf5;
  --gray-400: #8b95a7;
  --gray-600: #4b5563;
  --gray-800: #1f2937;
  --radius: 18px;
  --shadow: 0 10px 40px rgba(15, 43, 82, .10);
  --shadow-lg: 0 24px 64px rgba(15, 43, 82, .16);
  --font-head: 'Space Grotesk', sans-serif;
  --font-body: 'IBM Plex Sans', sans-serif;
  --transition: .35s cubic-bezier(.22, .61, .36, 1);
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 84px; }
body {
  font-family: var(--font-body);
  color: var(--gray-800);
  background: var(--white);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { text-decoration: none; color: inherit; }
h1, h2, h3, h4 { font-family: var(--font-head); line-height: 1.25; color: var(--blue-dark); }

.container { width: min(1200px, 92%); margin-inline: auto; }
.section { padding: clamp(72px, 9vw, 120px) 0; }
.section--alt { background: var(--gray-50); }

/* ---------- Encabezados de sección ---------- */
.section__head { text-align: center; max-width: 720px; margin: 0 auto clamp(40px, 6vw, 64px); }
.section__tag {
  display: inline-block; font-size: .78rem; font-weight: 600; letter-spacing: .14em;
  text-transform: uppercase; color: var(--blue);
  background: rgba(26, 86, 219, .08); border: 1px solid rgba(26, 86, 219, .18);
  padding: 6px 16px; border-radius: 100px; margin-bottom: 16px;
}
.section__tag--light { color: #bcd3ff; background: rgba(255,255,255,.08); border-color: rgba(255,255,255,.2); }
.section__title { font-size: clamp(1.75rem, 3.6vw, 2.6rem); font-weight: 700; margin-bottom: 14px; }
.section__subtitle { color: var(--gray-600); font-size: 1.06rem; }

/* ---------- Botones ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--font-head); font-weight: 600; font-size: .95rem;
  padding: 13px 28px; border-radius: 100px; border: 2px solid transparent;
  cursor: pointer; transition: var(--transition); white-space: nowrap;
}
.btn i { transition: transform var(--transition); }
.btn:hover i { transform: translateX(4px); }
.btn--lg { padding: 16px 34px; font-size: 1rem; }
.btn--block { width: 100%; justify-content: center; }
.btn--primary {
  background: linear-gradient(135deg, var(--blue), var(--blue-light));
  color: var(--white); box-shadow: 0 10px 28px rgba(26, 86, 219, .35);
}
.btn--primary:hover { transform: translateY(-3px); box-shadow: 0 16px 36px rgba(26, 86, 219, .45); }
.btn--ghost { color: var(--white); border-color: rgba(255, 255, 255, .55); backdrop-filter: blur(6px); }
.btn--ghost:hover { background: rgba(255, 255, 255, .12); border-color: var(--white); transform: translateY(-3px); }
.btn--light { background: var(--white); color: var(--blue-dark); }
.btn--light:hover { transform: translateY(-3px); box-shadow: 0 14px 30px rgba(0, 0, 0, .25); }

/* ---------- Glassmorphism ---------- */
.glass {
  background: rgba(255, 255, 255, .75);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid rgba(255, 255, 255, .5);
}

/* ---------- Navegación ---------- */
.nav {
  position: fixed; inset: 0 0 auto; z-index: 100;
  padding: 18px 0; transition: var(--transition);
}
.nav.is-scrolled {
  background: rgba(10, 31, 61, .85);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  padding: 10px 0;
  box-shadow: 0 8px 30px rgba(0, 0, 0, .2);
}
.nav__inner { display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.nav__brand { display: flex; align-items: center; gap: 12px; }
.nav__logo { height: 44px; width: auto; }
.nav__logomark {
  width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center;
  background: linear-gradient(135deg, var(--blue), var(--blue-light));
  color: var(--white); font-size: 1.25rem;
}
.nav__name { font-family: var(--font-head); font-weight: 700; font-size: 1.15rem; color: var(--white); }
.nav__links { display: flex; align-items: center; gap: 6px; }
.nav__links a {
  color: rgba(255, 255, 255, .85); font-size: .92rem; font-weight: 500;
  padding: 9px 15px; border-radius: 100px; transition: var(--transition);
}
.nav__links a:hover { color: var(--white); background: rgba(255, 255, 255, .1); }
.nav__cta { background: var(--blue); color: var(--white) !important; }
.nav__cta:hover { background: var(--blue-light) !important; }
.nav__toggle { display: none; background: none; border: 0; cursor: pointer; padding: 8px; }
.nav__toggle span { display: block; width: 24px; height: 2px; background: var(--white); margin: 5px 0; transition: var(--transition); border-radius: 2px; }

/* ---------- Hero ---------- */
.hero {
  position: relative; min-height: 100svh; display: flex; align-items: center;
  color: var(--white); overflow: hidden; background: var(--navy);
}
.hero__media { position: absolute; inset: -12% 0; z-index: 0; will-change: transform; }
.hero__image { position: absolute; inset: 0; background-size: cover; background-position: center; }
.hero__image--default {
  background:
    radial-gradient(ellipse 70% 55% at 75% 20%, rgba(59, 130, 246, .35), transparent 60%),
    radial-gradient(ellipse 55% 60% at 15% 85%, rgba(26, 86, 219, .3), transparent 55%),
    linear-gradient(160deg, #0a1f3d 0%, #0f2b52 55%, #123a6e 100%);
}
.hero__image--default::after {
  content: ''; position: absolute; inset: 0; opacity: .28;
  background-image:
    radial-gradient(circle at 22% 30%, rgba(255,255,255,.9) 1.5px, transparent 2px),
    radial-gradient(circle at 68% 18%, rgba(255,255,255,.8) 1.5px, transparent 2px),
    radial-gradient(circle at 82% 62%, rgba(255,255,255,.85) 1.5px, transparent 2px),
    radial-gradient(circle at 40% 74%, rgba(255,255,255,.7) 1.5px, transparent 2px),
    radial-gradient(circle at 55% 45%, rgba(255,255,255,.75) 1.5px, transparent 2px),
    linear-gradient(115deg, transparent 49.6%, rgba(120, 170, 255, .18) 49.8%, rgba(120, 170, 255, .18) 50.2%, transparent 50.4%),
    linear-gradient(65deg, transparent 49.6%, rgba(120, 170, 255, .14) 49.8%, rgba(120, 170, 255, .14) 50.2%, transparent 50.4%);
  background-size: 100% 100%, 100% 100%, 100% 100%, 100% 100%, 100% 100%, 340px 340px, 280px 280px;
}
.hero__video, .hero__yt iframe { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.hero__yt { position: absolute; inset: 0; pointer-events: none; }
.hero__yt iframe { width: 177.78vh; min-width: 100%; height: 56.25vw; min-height: 100%; left: 50%; top: 50%; transform: translate(-50%, -50%); }
.hero__overlay {
  position: absolute; inset: 0; z-index: 1;
  background: linear-gradient(180deg, rgba(10, 31, 61, calc(var(--overlay, .65) * .8)), rgba(10, 31, 61, var(--overlay, .65)) 60%, rgba(10, 31, 61, calc(var(--overlay, .65) + .12)));
}
.hero__content { position: relative; z-index: 2; max-width: 860px; padding: 140px 0 100px; }
.hero__eyebrow {
  font-size: .85rem; font-weight: 600; letter-spacing: .18em; text-transform: uppercase;
  color: #9cc0ff; margin-bottom: 22px; display: flex; align-items: center; gap: 10px;
}
.hero__title {
  font-size: clamp(2.1rem, 5.4vw, 3.9rem); font-weight: 700; color: var(--white);
  letter-spacing: -.02em; margin-bottom: 22px;
}
.hero__subtitle { font-size: clamp(1rem, 1.6vw, 1.22rem); color: rgba(255, 255, 255, .85); max-width: 640px; margin-bottom: 38px; font-weight: 300; }
.hero__actions { display: flex; gap: 16px; flex-wrap: wrap; }
.hero__scroll {
  position: absolute; left: 50%; bottom: 30px; transform: translateX(-50%); z-index: 2;
  width: 28px; height: 46px; border: 2px solid rgba(255, 255, 255, .5); border-radius: 100px;
  display: flex; justify-content: center; padding-top: 8px;
}
.hero__scroll-wheel { width: 4px; height: 9px; border-radius: 4px; background: var(--white); animation: scrollWheel 1.8s ease-in-out infinite; }
@keyframes scrollWheel { 0%, 100% { opacity: 1; transform: translateY(0); } 55% { opacity: .2; transform: translateY(14px); } }

/* ---------- Reveal on scroll ---------- */
.reveal { opacity: 0; transform: translateY(28px); transition: opacity .8s ease, transform .8s cubic-bezier(.22, .61, .36, 1); }
.reveal.is-visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  html { scroll-behavior: auto; }
}

/* ---------- Cards genéricas ---------- */
.card { background: var(--white); border-radius: var(--radius); box-shadow: var(--shadow); }

/* ---------- Quiénes somos ---------- */
.about__grid { display: grid; grid-template-columns: 1fr 1.15fr; gap: clamp(36px, 5vw, 72px); align-items: center; }
.about__media { position: relative; }
.about__media > img { border-radius: var(--radius); box-shadow: var(--shadow-lg); aspect-ratio: 4 / 4.6; object-fit: cover; width: 100%; }
.about__placeholder {
  aspect-ratio: 4 / 4.6; border-radius: var(--radius); display: grid; place-items: center;
  background: linear-gradient(150deg, var(--gray-100), #dfe7f5); color: var(--blue); font-size: 4.5rem;
  box-shadow: var(--shadow);
}
.about__badge {
  position: absolute; bottom: 26px; right: -18px; display: flex; gap: 12px; align-items: center;
  padding: 14px 20px; border-radius: 14px; box-shadow: var(--shadow-lg);
}
.about__badge i { font-size: 1.8rem; color: var(--blue); }
.about__badge strong { display: block; font-size: .92rem; color: var(--blue-dark); }
.about__badge span { font-size: .8rem; color: var(--gray-600); }
.about__body > p { color: var(--gray-600); margin-bottom: 18px; }
.about__features { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; margin-top: 32px; }
.feature { display: flex; gap: 14px; align-items: flex-start; }
.feature__icon {
  flex: none; width: 48px; height: 48px; border-radius: 13px; display: grid; place-items: center;
  background: rgba(26, 86, 219, .1); color: var(--blue); font-size: 1.3rem;
  transition: var(--transition);
}
.feature:hover .feature__icon { background: var(--blue); color: var(--white); transform: translateY(-3px); }
.feature h3 { font-size: 1rem; margin-bottom: 4px; }
.feature p { font-size: .88rem; color: var(--gray-600); line-height: 1.55; }

/* ---------- Servicios ---------- */
.services__grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; }
.service { overflow: hidden; transition: var(--transition); display: flex; flex-direction: column; }
.service:hover { transform: translateY(-8px); box-shadow: var(--shadow-lg); }
.service__media { height: 190px; overflow: hidden; position: relative; }
.service__media img { width: 100%; height: 100%; object-fit: cover; transition: transform .7s ease; }
.service:hover .service__media img { transform: scale(1.07); }
.service__media-default {
  height: 100%; display: grid; place-items: center; font-size: 3.4rem; color: rgba(255, 255, 255, .9);
  background: linear-gradient(140deg, var(--blue-dark), var(--blue));
}
.service__body { padding: 30px 28px 28px; position: relative; flex: 1; display: flex; flex-direction: column; }
.service__icon {
  position: absolute; top: -28px; left: 28px; width: 56px; height: 56px; border-radius: 16px;
  display: grid; place-items: center; font-size: 1.5rem; color: var(--white);
  background: linear-gradient(135deg, var(--blue), var(--blue-light));
  box-shadow: 0 12px 26px rgba(26, 86, 219, .4);
}
.service__body h3 { font-size: 1.28rem; margin: 22px 0 4px; }
.service__subtitle { font-size: .85rem; font-weight: 600; color: var(--blue); margin-bottom: 12px; }
.service__desc { font-size: .92rem; color: var(--gray-600); margin-bottom: 20px; flex: 1; }
.service__more { font-weight: 600; font-size: .92rem; color: var(--blue); display: inline-flex; align-items: center; gap: 8px; }
.service__more i { transition: transform var(--transition); }
.service__more:hover i { transform: translateX(5px); }

.advantages {
  margin-top: 56px; border-radius: var(--radius); padding: 36px clamp(24px, 4vw, 48px);
  box-shadow: var(--shadow);
}
.advantages h3 { font-size: 1.2rem; margin-bottom: 18px; }
.advantages ul { list-style: none; display: flex; flex-wrap: wrap; gap: 14px 36px; }
.advantages li { display: flex; align-items: center; gap: 10px; font-weight: 500; color: var(--gray-800); }
.advantages li i { color: var(--blue); font-size: 1.15rem; }

/* ---------- Proyectos ---------- */
.projects__filters { display: flex; justify-content: center; flex-wrap: wrap; gap: 10px; margin-bottom: 44px; }
.filter {
  font-family: var(--font-head); font-weight: 500; font-size: .88rem; cursor: pointer;
  padding: 9px 22px; border-radius: 100px; border: 1.5px solid var(--gray-100);
  background: var(--white); color: var(--gray-600); transition: var(--transition);
}
.filter:hover { border-color: var(--blue); color: var(--blue); }
.filter.is-active { background: var(--blue); border-color: var(--blue); color: var(--white); }
.projects__grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; }
.project { overflow: hidden; cursor: pointer; transition: var(--transition); }
.project.is-hidden { display: none; }
.project:hover { transform: translateY(-8px); box-shadow: var(--shadow-lg); }
.project__media { height: 220px; overflow: hidden; position: relative; }
.project__media img { width: 100%; height: 100%; object-fit: cover; transition: transform .7s ease; }
.project:hover .project__media img { transform: scale(1.08); }
.project__media-default {
  height: 100%; display: grid; place-items: center; font-size: 3rem; color: var(--blue);
  background: linear-gradient(150deg, var(--gray-100), #dce6f7);
}
.project__zoom {
  position: absolute; inset: 0; display: grid; place-items: center; font-size: 1.6rem; color: var(--white);
  background: rgba(15, 43, 82, .45); opacity: 0; transition: var(--transition);
}
.project:hover .project__zoom { opacity: 1; }
.project__body { padding: 24px 26px 26px; }
.project__cat {
  font-size: .72rem; font-weight: 600; letter-spacing: .1em; text-transform: uppercase;
  color: var(--blue); background: rgba(26, 86, 219, .09); padding: 4px 12px; border-radius: 100px;
}
.project__body h3 { font-size: 1.1rem; margin: 12px 0 6px; }
.project__client { font-size: .9rem; font-weight: 500; color: var(--gray-800); display: flex; gap: 8px; align-items: center; }
.project__client i { color: var(--blue); }
.project__meta { display: flex; gap: 18px; margin-top: 8px; font-size: .82rem; color: var(--gray-400); }
.project__meta span { display: flex; gap: 6px; align-items: center; }

/* ---------- Clientes (marquee) ---------- */
.clients__marquee { overflow: hidden; -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); }
.clients__track { display: flex; align-items: center; gap: clamp(48px, 7vw, 96px); width: max-content; animation: marquee 32s linear infinite; padding: 10px 0; }
.clients__marquee:hover .clients__track { animation-play-state: paused; }
@keyframes marquee { to { transform: translateX(-50%); } }
.clients__item { display: grid; place-items: center; filter: grayscale(1); opacity: .55; transition: var(--transition); }
.clients__item:hover { filter: grayscale(0); opacity: 1; }
.clients__item img { max-height: 64px; max-width: 170px; object-fit: contain; }
.clients__name { font-family: var(--font-head); font-weight: 600; font-size: 1.05rem; color: var(--blue-dark); white-space: nowrap; }

/* ---------- Mercado Público ---------- */
.market { padding-top: 0; }
.market__card {
  position: relative; overflow: hidden; border-radius: 24px;
  background: linear-gradient(140deg, var(--navy), var(--blue-dark) 55%, #14417c);
  color: var(--white); padding: clamp(36px, 6vw, 64px);
  display: grid; grid-template-columns: 1.6fr .6fr; gap: 24px; align-items: center;
  border: 1px solid rgba(255, 255, 255, .08);
}
.market__card h2 { color: var(--white); font-size: clamp(1.5rem, 3vw, 2.1rem); margin: 14px 0 16px; }
.market__card > .market__body > p { color: rgba(255, 255, 255, .82); margin-bottom: 22px; font-weight: 300; }
.market__items { list-style: none; display: grid; grid-template-columns: 1fr 1fr; gap: 10px 24px; margin-bottom: 30px; }
.market__items li { display: flex; gap: 10px; align-items: center; font-size: .95rem; color: rgba(255, 255, 255, .9); }
.market__items i { color: #7db4ff; }
.market__icon { font-size: clamp(5rem, 10vw, 9rem); color: rgba(255, 255, 255, .12); text-align: center; }
.market__logo {
  background: var(--white); border-radius: 18px; padding: clamp(20px, 3vw, 34px);
  display: grid; place-items: center; box-shadow: 0 18px 44px rgba(0, 0, 0, .3);
  justify-self: center; max-width: 320px;
}
.market__logo img { width: 100%; max-width: 250px; height: auto; }

/* ---------- Contacto ---------- */
.contact__grid { display: grid; grid-template-columns: .8fr 1.2fr; gap: clamp(32px, 5vw, 64px); }
.contact__item { display: flex; gap: 16px; align-items: flex-start; margin-bottom: 26px; }
.contact__item i {
  flex: none; width: 48px; height: 48px; border-radius: 13px; display: grid; place-items: center;
  background: rgba(26, 86, 219, .1); color: var(--blue); font-size: 1.25rem;
}
.contact__item strong { display: block; font-family: var(--font-head); font-size: .95rem; color: var(--blue-dark); }
.contact__item span, .contact__item a { color: var(--gray-600); font-size: .95rem; }
.contact__item a:hover { color: var(--blue); }
.contact__social { display: flex; gap: 12px; margin-top: 30px; }
.contact__social a {
  width: 46px; height: 46px; border-radius: 13px; display: grid; place-items: center; font-size: 1.25rem;
  background: var(--gray-50); color: var(--blue-dark); border: 1px solid var(--gray-100); transition: var(--transition);
}
.contact__social a:hover { background: var(--blue); color: var(--white); transform: translateY(-4px) scale(1.05); box-shadow: 0 10px 22px rgba(26, 86, 219, .35); }
.contact__form { padding: clamp(26px, 4vw, 42px); }
.form__row { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.form__group { margin-bottom: 18px; }
.form__group label { display: block; font-size: .85rem; font-weight: 600; color: var(--blue-dark); margin-bottom: 7px; }
.form__group input, .form__group textarea {
  width: 100%; padding: 13px 16px; border-radius: 12px; border: 1.5px solid var(--gray-100);
  font-family: var(--font-body); font-size: .95rem; color: var(--gray-800);
  background: var(--gray-50); transition: var(--transition); resize: vertical;
}
.form__group input:focus, .form__group textarea:focus {
  outline: none; border-color: var(--blue); background: var(--white); box-shadow: 0 0 0 4px rgba(26, 86, 219, .12);
}
.hp-field { position: absolute !important; left: -9999px !important; opacity: 0; height: 0; }
.form__feedback { margin-bottom: 14px; font-size: .92rem; font-weight: 500; display: none; padding: 12px 16px; border-radius: 12px; }
.form__feedback.ok { display: block; color: #0d6e3f; background: #e5f7ee; }
.form__feedback.error { display: block; color: #b42318; background: #fdecea; }
.contact__map { margin-top: clamp(48px, 6vw, 80px); }
.contact__map iframe { display: block; filter: grayscale(.25); }

/* ---------- Footer ---------- */
.footer { background: var(--navy); color: rgba(255, 255, 255, .75); padding-top: clamp(56px, 7vw, 80px); }
.footer__grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 40px; padding-bottom: 48px; }
.footer__logo { height: 46px; width: auto; margin-bottom: 16px; }
.footer__brand { font-family: var(--font-head); font-weight: 700; font-size: 1.2rem; color: var(--white); margin-bottom: 12px; }
.footer__brand i { color: var(--blue-light); }
.footer__slogan { font-size: .92rem; font-weight: 300; max-width: 320px; }
.footer h4 { color: var(--white); font-size: 1rem; margin-bottom: 18px; }
.footer__grid a { display: block; font-size: .92rem; margin-bottom: 10px; transition: var(--transition); }
.footer__grid a:hover { color: var(--white); transform: translateX(4px); }
.footer__grid p { font-size: .92rem; margin-bottom: 10px; display: flex; gap: 10px; align-items: center; }
.footer__grid p i { color: var(--blue-light); }
.footer__bottom { border-top: 1px solid rgba(255, 255, 255, .1); padding: 22px 0; text-align: center; font-size: .85rem; }

/* ---------- WhatsApp ---------- */
.whatsapp {
  position: fixed; right: 26px; bottom: 26px; z-index: 90;
  width: 60px; height: 60px; border-radius: 50%; display: grid; place-items: center;
  background: #25d366; color: var(--white); font-size: 1.8rem;
  box-shadow: 0 12px 28px rgba(37, 211, 102, .45);
  animation: pulse 2.4s infinite; transition: var(--transition);
}
.whatsapp:hover { transform: scale(1.1); }
@keyframes pulse {
  0% { box-shadow: 0 12px 28px rgba(37, 211, 102, .45), 0 0 0 0 rgba(37, 211, 102, .5); }
  70% { box-shadow: 0 12px 28px rgba(37, 211, 102, .45), 0 0 0 18px rgba(37, 211, 102, 0); }
  100% { box-shadow: 0 12px 28px rgba(37, 211, 102, .45), 0 0 0 0 rgba(37, 211, 102, 0); }
}
.whatsapp__tooltip {
  position: absolute; right: 72px; top: 50%; transform: translateY(-50%);
  background: var(--blue-dark); color: var(--white); font-size: .82rem; font-weight: 500;
  padding: 8px 14px; border-radius: 10px; white-space: nowrap;
  opacity: 0; pointer-events: none; transition: var(--transition);
}
.whatsapp__tooltip::after {
  content: ''; position: absolute; left: 100%; top: 50%; transform: translateY(-50%);
  border: 6px solid transparent; border-left-color: var(--blue-dark);
}
.whatsapp:hover .whatsapp__tooltip { opacity: 1; }

/* ---------- Lightbox ---------- */
.lightbox {
  position: fixed; inset: 0; z-index: 200; display: none;
  background: rgba(6, 16, 32, .94); align-items: center; justify-content: center;
}
.lightbox.is-open { display: flex; animation: lbFade .3s ease; }
@keyframes lbFade { from { opacity: 0; } }
.lightbox__stage { max-width: min(1100px, 88vw); text-align: center; }
.lightbox__img { max-width: 100%; max-height: 72vh; margin: 0 auto; border-radius: 12px; box-shadow: 0 30px 80px rgba(0, 0, 0, .5); }
.lightbox__caption { color: var(--white); margin-top: 18px; }
.lightbox__caption h3 { color: var(--white); font-size: 1.15rem; }
.lightbox__caption p { color: rgba(255, 255, 255, .7); font-size: .9rem; max-width: 720px; margin: 6px auto 0; }
.lightbox__close, .lightbox__nav {
  position: absolute; background: rgba(255, 255, 255, .1); border: 0; color: var(--white);
  width: 52px; height: 52px; border-radius: 50%; font-size: 1.3rem; cursor: pointer;
  display: grid; place-items: center; transition: var(--transition);
}
.lightbox__close:hover, .lightbox__nav:hover { background: rgba(255, 255, 255, .25); }
.lightbox__close { top: 26px; right: 26px; }
.lightbox__prev { left: 26px; top: 50%; transform: translateY(-50%); }
.lightbox__next { right: 26px; top: 50%; transform: translateY(-50%); }

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
  .services__grid, .projects__grid { grid-template-columns: repeat(2, 1fr); }
  .market__card { grid-template-columns: 1fr; }
  .market__icon { display: none; }
}
@media (max-width: 820px) {
  .nav__toggle { display: block; }
  .nav__links {
    position: fixed; inset: 0 0 auto; top: 0; padding: 96px 8% 40px; flex-direction: column; align-items: stretch;
    background: rgba(10, 31, 61, .97); backdrop-filter: blur(16px);
    transform: translateY(-100%); transition: transform .45s cubic-bezier(.22, .61, .36, 1);
  }
  .nav.is-open .nav__links { transform: none; }
  .nav.is-open { background: transparent; }
  .nav__links a { padding: 14px 18px; font-size: 1.05rem; text-align: center; }
  .nav.is-open .nav__toggle span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .nav.is-open .nav__toggle span:nth-child(2) { opacity: 0; }
  .nav.is-open .nav__toggle span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
  .about__grid, .contact__grid { grid-template-columns: 1fr; }
  .about__badge { right: 10px; }
  .about__features { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .services__grid, .projects__grid { grid-template-columns: 1fr; }
  .form__row { grid-template-columns: 1fr; }
  .footer__grid { grid-template-columns: 1fr; gap: 28px; }
  .market__items { grid-template-columns: 1fr; }
  .hero__actions .btn { width: 100%; justify-content: center; }
  .whatsapp { right: 18px; bottom: 18px; }
  .lightbox__prev { left: 8px; } .lightbox__next { right: 8px; }
}

/* ---------- Mercado Público (rediseño humano/animado) ---------- */
.market2 {
  position: relative; border-radius: 28px; overflow: hidden; isolation: isolate;
  background: linear-gradient(135deg, #0a1f3d 0%, #10305e 58%, #16407e 100%);
  color: var(--white); padding: clamp(40px, 6vw, 76px);
  border: 1px solid rgba(255, 255, 255, .08);
}
.market2::before {
  content: ''; position: absolute; inset: 0; z-index: -1; opacity: .35;
  background-image:
    linear-gradient(rgba(255,255,255,.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.05) 1px, transparent 1px);
  background-size: 44px 44px;
  -webkit-mask-image: radial-gradient(ellipse 90% 90% at 50% 50%, #000 30%, transparent 75%);
  mask-image: radial-gradient(ellipse 90% 90% at 50% 50%, #000 30%, transparent 75%);
}
.market2__glow { position: absolute; z-index: -1; border-radius: 50%; filter: blur(80px); }
.market2__glow--a { width: 380px; height: 380px; top: -140px; right: -80px; background: rgba(59, 130, 246, .4); animation: m2drift 11s ease-in-out infinite alternate; }
.market2__glow--b { width: 320px; height: 320px; bottom: -150px; left: -60px; background: rgba(37, 99, 235, .3); animation: m2drift 14s ease-in-out infinite alternate-reverse; }
@keyframes m2drift { from { transform: translate(0, 0) scale(1); } to { transform: translate(-46px, 34px) scale(1.15); } }

.market2__inner { display: grid; grid-template-columns: 1.5fr .8fr; gap: clamp(32px, 5vw, 64px); align-items: center; }

.market2__eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  font-size: .8rem; font-weight: 600; letter-spacing: .16em; text-transform: uppercase;
  color: #9cc0ff; margin-bottom: 18px;
}
.market2__dot { width: 9px; height: 9px; border-radius: 50%; background: #4ade80; animation: m2pulse 2s ease-in-out infinite; }
@keyframes m2pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(74, 222, 128, .55); }
  60% { box-shadow: 0 0 0 9px rgba(74, 222, 128, 0); }
}

.market2__title { color: var(--white); font-size: clamp(1.6rem, 3.2vw, 2.3rem); font-weight: 700; margin-bottom: 18px; letter-spacing: -.01em; }
.market2__hl {
  background-image: linear-gradient(90deg, #3b82f6, #7db4ff);
  background-repeat: no-repeat; background-size: 0% 5px; background-position: 0 96%;
  padding-bottom: 6px; transition: background-size 1.1s cubic-bezier(.22, .61, .36, 1) .55s;
}
.market2.is-visible .market2__hl { background-size: 100% 5px; }

.market2__text { color: rgba(255, 255, 255, .82); font-weight: 300; max-width: 58ch; margin-bottom: 30px; }

.market2__actions { display: flex; align-items: center; gap: 26px; flex-wrap: wrap; }
.market2__alt {
  color: #9cc0ff; font-size: .95rem; font-weight: 500;
  display: inline-flex; align-items: center; gap: 8px; transition: var(--transition);
  border-bottom: 1px dashed rgba(156, 192, 255, .45); padding-bottom: 2px;
}
.market2__alt i { transition: transform var(--transition); }
.market2__alt:hover { color: var(--white); border-bottom-color: var(--white); }
.market2__alt:hover i { transform: translateX(5px); }

.market2__side { display: flex; flex-direction: column; align-items: center; gap: 20px; }
.market2__card {
  background: var(--white); border-radius: 22px; padding: clamp(24px, 3vw, 38px);
  display: grid; place-items: center; width: min(300px, 100%);
  box-shadow: 0 24px 60px rgba(0, 0, 0, .35);
  transform: rotate(-3deg);
  animation: m2float 6s ease-in-out infinite;
  transition: transform .5s cubic-bezier(.22, .61, .36, 1);
}
.market2__card:hover { transform: rotate(0deg) scale(1.04); animation-play-state: paused; }
.market2__card img { width: 100%; max-width: 240px; height: auto; }
.market2__card i { font-size: 4.5rem; color: var(--blue); }
@keyframes m2float { 0%, 100% { translate: 0 0; } 50% { translate: 0 -12px; } }

.market2__stamp {
  display: inline-flex; align-items: center; gap: 9px;
  background: rgba(255, 255, 255, .1); border: 1px solid rgba(255, 255, 255, .18);
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  color: rgba(255, 255, 255, .92); font-size: .88rem; font-weight: 500;
  padding: 9px 18px; border-radius: 100px; transform: rotate(1.5deg);
}
.market2__stamp i { color: #4ade80; font-size: 1.05rem; }

/* Aparición escalonada de los elementos internos */
.market2 .market2__body > *, .market2 .market2__side > * {
  opacity: 0; transform: translateY(18px);
  transition: opacity .7s ease, transform .7s cubic-bezier(.22, .61, .36, 1);
}
.market2.is-visible .market2__body > *, .market2.is-visible .market2__side > * { opacity: 1; transform: none; }
.market2.is-visible .market2__body > *:nth-child(2) { transition-delay: .12s; }
.market2.is-visible .market2__body > *:nth-child(3) { transition-delay: .24s; }
.market2.is-visible .market2__body > *:nth-child(4) { transition-delay: .36s; }
.market2.is-visible .market2__side > *:nth-child(1) { transition-delay: .3s; }
.market2.is-visible .market2__side > *:nth-child(2) { transition-delay: .5s; }
/* mantener transform propios tras aparecer */
.market2.is-visible .market2__card { transform: rotate(-3deg); }
.market2.is-visible .market2__card:hover { transform: rotate(0deg) scale(1.04); }
.market2.is-visible .market2__stamp { transform: rotate(1.5deg); }

@media (max-width: 1024px) {
  .market2__inner { grid-template-columns: 1fr; }
  .market2__side { flex-direction: row; justify-content: center; flex-wrap: wrap; }
}
@media (prefers-reduced-motion: reduce) {
  .market2__glow--a, .market2__glow--b, .market2__card, .market2__dot { animation: none; }
  .market2 .market2__body > *, .market2 .market2__side > * { opacity: 1; transform: none; transition: none; }
}

/* ---------- Quiénes somos: colage de fotografías ---------- */
.about__collage { position: relative; aspect-ratio: 4 / 4.3; }
.about__accent {
  position: absolute; top: -26px; right: -20px; width: 130px; height: 130px; z-index: 0;
  background-image: radial-gradient(rgba(26, 86, 219, .4) 2.2px, transparent 2.6px);
  background-size: 17px 17px; border-radius: 6px;
}
.about__shot {
  position: absolute; margin: 0; overflow: hidden; border-radius: 16px;
  border: 6px solid var(--white); box-shadow: var(--shadow-lg);
  transition: transform .55s cubic-bezier(.22, .61, .36, 1), box-shadow .55s ease, z-index 0s;
}
.about__shot img { width: 100%; height: 100%; object-fit: cover; display: block; }
.about__shot:hover { z-index: 6; box-shadow: 0 30px 70px rgba(15, 43, 82, .28); }

/* Una sola foto */
.about__collage--n1 .about__shot--1 { inset: 0; transform: rotate(-1.5deg); }
.about__collage--n1 .about__shot--1:hover { transform: rotate(0deg) scale(1.02); }

/* Dos fotos */
.about__collage--n2 .about__shot--1 { top: 0; left: 0; width: 80%; height: 70%; transform: rotate(-2deg); z-index: 1; }
.about__collage--n2 .about__shot--2 { right: 0; bottom: 0; width: 64%; height: 50%; transform: rotate(2.5deg); z-index: 2; }
.about__collage--n2 .about__shot--1:hover { transform: rotate(0deg) translateY(-6px); }
.about__collage--n2 .about__shot--2:hover { transform: rotate(0deg) translateY(-6px); }

/* Tres fotos */
.about__collage--n3 .about__shot--1 { top: 0; left: 0; width: 76%; height: 60%; transform: rotate(-2deg); z-index: 1; }
.about__collage--n3 .about__shot--2 { right: 0; top: 24%; width: 54%; height: 42%; transform: rotate(2deg); z-index: 2; }
.about__collage--n3 .about__shot--3 { left: 10%; bottom: 0; width: 60%; height: 34%; transform: rotate(-1deg); z-index: 3; }
.about__collage--n3 .about__shot--1:hover,
.about__collage--n3 .about__shot--2:hover,
.about__collage--n3 .about__shot--3:hover { transform: rotate(0deg) translateY(-6px); }

@media (prefers-reduced-motion: reduce) {
  .about__shot, .about__shot:hover { transition: none; transform: none; }
}

/* ---------- Mercado Público: banda a todo el ancho + red animada ---------- */
.market2-band {
  position: relative; overflow: hidden; isolation: isolate;
  background: linear-gradient(135deg, #0a1f3d 0%, #10305e 58%, #16407e 100%);
  padding: clamp(80px, 10vw, 130px) 0;
}
.market2-band::before {
  content: ''; position: absolute; inset: 0; z-index: -2; opacity: .3;
  background-image:
    linear-gradient(rgba(255,255,255,.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.05) 1px, transparent 1px);
  background-size: 44px 44px;
}
.market2__net { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 0; opacity: .55; pointer-events: none; }
.market2-band .container { position: relative; z-index: 2; }

/* El contenedor interior deja de ser tarjeta: la banda es el fondo */
.market2-band .market2 { background: none; border: 0; border-radius: 0; padding: 0; overflow: visible; isolation: auto; }
.market2-band .market2::before { content: none; }
.market2-band .market2__glow { z-index: -1; }

/* Logo más grande y derecho */
.market2-band .market2__card {
  transform: none; width: min(400px, 100%); border-radius: 26px;
  padding: clamp(30px, 3.5vw, 48px);
}
.market2-band .market2__card:hover { transform: scale(1.03); }
.market2-band .market2__card img { max-width: 330px; }
.market2-band .market2.is-visible .market2__card { transform: none; }
.market2-band .market2.is-visible .market2__card:hover { transform: scale(1.03); }

/* ---------- Proyectos: fondo con imágenes rotativas ---------- */
.projects--dark { position: relative; overflow: hidden; background: var(--navy); }
.projects__bg { position: absolute; inset: 0; z-index: 0; }
.projects__bg-slide {
  position: absolute; inset: 0; background-size: cover; background-position: center;
  opacity: 0; transition: opacity 1.8s ease; will-change: opacity, transform;
}
.projects__bg-slide.is-active { opacity: 1; animation: kenburns 9s ease-out forwards; }
@keyframes kenburns { from { transform: scale(1); } to { transform: scale(1.09); } }
.projects__bg-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(10, 31, 61, .93), rgba(10, 31, 61, .84) 45%, rgba(10, 31, 61, .93));
}
.projects--dark .container { position: relative; z-index: 1; }

/* Textos y controles en claro */
.projects--dark .section__title { color: var(--white); }
.projects--dark .section__subtitle { color: rgba(255, 255, 255, .78); }
.projects--dark .filter {
  background: rgba(255, 255, 255, .06); border-color: rgba(255, 255, 255, .28);
  color: rgba(255, 255, 255, .85); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
}
.projects--dark .filter:hover { border-color: var(--blue-light); color: var(--white); }
.projects--dark .filter.is-active { background: var(--blue); border-color: var(--blue); color: var(--white); }
.projects--dark .project { box-shadow: 0 18px 50px rgba(0, 0, 0, .35); }

@media (prefers-reduced-motion: reduce) {
  .projects__bg-slide.is-active { animation: none; }
}

/* ---------- RRSS en el menú principal ---------- */
.nav__social {
  display: flex; align-items: center; gap: 4px;
  margin-left: 12px; padding-left: 16px; border-left: 1px solid rgba(255, 255, 255, .22);
}
.nav__links .nav__social-link {
  width: 38px; height: 38px; padding: 0; border-radius: 11px;
  display: grid; place-items: center; font-size: 1.1rem;
  color: rgba(255, 255, 255, .8);
}
.nav__links .nav__social-link:hover { color: var(--white); background: rgba(255, 255, 255, .12); transform: translateY(-2px); }

@media (max-width: 820px) {
  .nav__social {
    justify-content: center; margin: 14px 0 0; padding: 18px 0 0;
    border-left: 0; border-top: 1px solid rgba(255, 255, 255, .15); gap: 14px;
  }
  .nav__links .nav__social-link { width: 46px; height: 46px; font-size: 1.3rem; }
}

/* ---------- Globo "¡Hablemos!" del WhatsApp ---------- */
.whatsapp__bubble {
  position: absolute; bottom: 74px; right: 0;
  background: var(--white); color: var(--blue-dark);
  font-family: var(--font-head); font-weight: 600; font-size: .98rem;
  padding: 11px 20px; border-radius: 16px 16px 4px 16px;
  box-shadow: 0 14px 36px rgba(15, 43, 82, .28); white-space: nowrap;
  opacity: 0; transform: translateY(10px) scale(.8); transform-origin: bottom right;
  pointer-events: none;
  transition: opacity .5s cubic-bezier(.34, 1.56, .64, 1), transform .5s cubic-bezier(.34, 1.56, .64, 1);
}
.whatsapp__bubble::after {
  content: ''; position: absolute; top: 100%; right: 16px;
  border: 8px solid transparent; border-top-color: var(--white);
}
.whatsapp__bubble.is-shown { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  .whatsapp__bubble { transition: opacity .3s ease; transform: none; }
}

/* ---------- Contacto: rediseño (tarjeta dividida) ---------- */
.contact { padding-bottom: 0; }
.contact__map { margin-top: clamp(48px, 6vw, 80px); margin-bottom: 0; line-height: 0; font-size: 0; }
.contact__map iframe { display: block; width: 100%; }

.cf {
  display: grid; grid-template-columns: .85fr 1.35fr;
  border-radius: 26px; overflow: hidden; box-shadow: var(--shadow-lg);
  background: var(--white);
}
.cf__aside {
  position: relative; overflow: hidden; isolation: isolate;
  background: linear-gradient(160deg, #0a1f3d, #10305e 60%, #16407e);
  color: var(--white); padding: clamp(30px, 4vw, 48px);
  display: flex; flex-direction: column;
}
.cf__blob {
  position: absolute; z-index: -1; width: 300px; height: 300px; border-radius: 50%;
  background: rgba(59, 130, 246, .35); filter: blur(80px); top: -100px; right: -80px;
  animation: m2drift 12s ease-in-out infinite alternate;
}
.cf__aside h3 { color: var(--white); font-size: 1.5rem; margin-bottom: 10px; }
.cf__promise {
  display: inline-flex; align-items: center; gap: 8px; font-size: .88rem; font-weight: 500;
  color: #a7f3c7; margin-bottom: 28px;
}
.cf__info { list-style: none; display: grid; gap: 18px; margin-bottom: 30px; }
.cf__info li { display: flex; gap: 14px; align-items: flex-start; font-size: .93rem; color: rgba(255, 255, 255, .85); }
.cf__info li i {
  flex: none; width: 40px; height: 40px; border-radius: 11px; display: grid; place-items: center;
  background: rgba(255, 255, 255, .1); color: #9cc0ff; font-size: 1.05rem;
}
.cf__info a { color: rgba(255, 255, 255, .85); transition: var(--transition); }
.cf__info a:hover { color: var(--white); }
.cf__social { display: flex; gap: 10px; margin-top: auto; }
.cf__social a {
  width: 42px; height: 42px; border-radius: 11px; display: grid; place-items: center;
  background: rgba(255, 255, 255, .1); color: var(--white); font-size: 1.15rem; transition: var(--transition);
}
.cf__social a:hover { background: var(--blue); transform: translateY(-3px); }

.cf__form { position: relative; padding: clamp(28px, 4vw, 46px); }
.cf__hint { font-family: var(--font-head); font-weight: 600; font-size: .95rem; color: var(--blue-dark); margin-bottom: 12px; }
.cf__chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 24px; }
.cf__chip {
  font-family: var(--font-head); font-size: .84rem; font-weight: 500; cursor: pointer;
  padding: 8px 16px; border-radius: 100px; border: 1.5px solid var(--gray-100);
  background: var(--gray-50); color: var(--gray-600); transition: var(--transition);
}
.cf__chip:hover { border-color: var(--blue); color: var(--blue); transform: translateY(-2px); }
.cf__chip.is-active { background: var(--blue); border-color: var(--blue); color: var(--white); box-shadow: 0 6px 16px rgba(26, 86, 219, .3); }

.cf__grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-bottom: 14px; }
.ff { position: relative; display: block; }
.ff input, .ff textarea {
  width: 100%; padding: 24px 16px 9px; border-radius: 13px; border: 1.5px solid var(--gray-100);
  font-family: var(--font-body); font-size: .95rem; color: var(--gray-800);
  background: var(--gray-50); transition: var(--transition); resize: vertical;
}
.ff input:focus, .ff textarea:focus {
  outline: none; border-color: var(--blue); background: var(--white);
  box-shadow: 0 0 0 4px rgba(26, 86, 219, .12);
}
.ff span {
  position: absolute; left: 17px; top: 17px; font-size: .93rem; color: var(--gray-400);
  pointer-events: none; transition: var(--transition);
}
.ff input:focus + span, .ff input:not(:placeholder-shown) + span,
.ff textarea:focus + span, .ff textarea:not(:placeholder-shown) + span {
  top: 7px; font-size: .68rem; font-weight: 600; letter-spacing: .04em;
  text-transform: uppercase; color: var(--blue);
}
.ff--area { margin-bottom: 16px; }
.cf__privacy {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  font-size: .8rem; color: var(--gray-400); margin-top: 14px;
}
.cf__privacy i { color: var(--blue); }

/* Estado de éxito */
.cf__success { display: none; text-align: center; padding: clamp(30px, 6vw, 70px) 20px; }
.cf__form.is-sent .cf__fields { display: none; }
.cf__form.is-sent .cf__success { display: block; animation: cfPop .6s cubic-bezier(.34, 1.56, .64, 1); }
.cf__success i { font-size: 4rem; color: #16a34a; display: block; margin-bottom: 14px; }
.cf__success h3 { font-size: 1.4rem; margin-bottom: 8px; }
.cf__success p { color: var(--gray-600); }
@keyframes cfPop { from { opacity: 0; transform: scale(.85) translateY(14px); } }

@media (max-width: 920px) {
  .cf { grid-template-columns: 1fr; }
  .cf__grid { grid-template-columns: 1fr; }
  .cf__social { margin-top: 22px; }
}

/* ---------- Crédito del pie de página ---------- */
.footer__credit-sep { margin: 0 6px; opacity: .5; }
.footer__heart { color: #ef4444; display: inline-block; animation: heartbeat 1.6s ease-in-out infinite; }
@keyframes heartbeat {
  0%, 100% { transform: scale(1); }
  12% { transform: scale(1.25); }
  24% { transform: scale(1); }
  36% { transform: scale(1.18); }
  48% { transform: scale(1); }
}
.footer__credit { display: inline; color: #9cc0ff; font-weight: 500; transition: var(--transition); }
.footer__bottom .footer__credit:hover { color: var(--white); }
@media (prefers-reduced-motion: reduce) { .footer__heart { animation: none; } }
