html {
  scroll-behavior: smooth;
}

html.vp-intro-open,
body.vp-intro-open {
  background: #020817;
  overscroll-behavior: none;
}

body.vp-intro-open > *:not(.vp-intro) {
  visibility: hidden;
}

body.vp-intro-open,
body.vp-menu-open,
body.vp-lightbox-open {
  overflow: hidden;
}

.vp-intro {
  position: fixed;
  inset: 0;
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 100vh;
  min-height: 100svh;
  height: 100dvh;
  padding: 24px;
  padding-bottom: calc(24px + env(safe-area-inset-bottom, 0px));
  background: #020817;
  opacity: 0;
  overflow: visible;
  transition: opacity 0.35s ease;
}

.vp-intro::after {
  content: "";
  position: absolute;
  top: calc(100% - 1px);
  right: 0;
  left: 0;
  height: max(180px, env(safe-area-inset-bottom, 0px));
  background: #020817;
}

.vp-intro-visible {
  opacity: 1;
}

.vp-intro-leaving {
  opacity: 0;
  transition-duration: 0.9s;
}

.vp-intro-text {
  position: relative;
  z-index: 1;
  max-width: 1100px;
  color: #fff;
  font-size: clamp(2.1rem, 7vw, 7rem);
  font-weight: 900;
  line-height: 0.95;
  letter-spacing: -0.045em;
  text-align: center;
}

.vp-intro-text span {
  display: inline-block;
  animation: vp-word-in 0.65s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.vp-intro-text span:nth-child(2) { animation-delay: 0.06s; }
.vp-intro-text span:nth-child(3) { animation-delay: 0.12s; }
.vp-intro-text span:nth-child(4) { animation-delay: 0.18s; }
.vp-intro-text span:nth-child(5) { animation-delay: 0.24s; }

@keyframes vp-word-in {
  from { opacity: 0; transform: translateY(100%); }
  to { opacity: 1; transform: translateY(0); }
}

#inicio h1 {
  transition: opacity 0.36s ease, transform 0.36s ease;
}

#inicio h1.vp-title-changing {
  opacity: 0 !important;
  transform: translateY(22px) !important;
}

#inicio header.vp-scrolled {
  background: rgba(7, 26, 51, 0.86) !important;
  box-shadow: 0 4px 18px -12px rgba(7, 26, 51, 0.4);
  backdrop-filter: blur(18px);
}

.vp-wordmark {
  display: inline-flex;
  min-width: 136px;
  flex-direction: column;
  align-items: flex-start;
  color: #fff;
  line-height: 1;
  filter: drop-shadow(0 3px 10px rgba(0, 8, 24, 0.48));
  user-select: none;
}

.vp-wordmark-main {
  display: flex;
  align-items: baseline;
  font-family: Inter, "Helvetica Neue", Arial, sans-serif;
  font-size: 29px;
  font-weight: 900;
  letter-spacing: -0.065em;
  line-height: 0.88;
}

.vp-wordmark-accent {
  margin-right: 1px;
  color: var(--brand, #005bea);
  font-size: 1.08em;
  font-style: italic;
}

.vp-wordmark-sub {
  margin-top: 6px;
  padding-left: 2px;
  color: rgba(255, 255, 255, 0.82);
  font-family: Inter, "Helvetica Neue", Arial, sans-serif;
  font-size: 6.5px;
  font-weight: 800;
  letter-spacing: 0.2em;
  line-height: 1;
  text-transform: uppercase;
}

footer .vp-wordmark-main {
  font-size: 34px;
}

footer .vp-wordmark-sub {
  font-size: 7px;
}

@media (min-width: 768px) {
  .vp-wordmark {
    min-width: 158px;
  }

  .vp-wordmark-main {
    font-size: 34px;
  }

  .vp-wordmark-sub {
    font-size: 7px;
  }
}

.vp-pending {
  opacity: 0 !important;
  transform: translateY(var(--vp-reveal-distance, 24px)) !important;
}

.vp-pending.vp-visible {
  opacity: 1 !important;
  transform: none !important;
  transition: opacity 0.6s cubic-bezier(0.16, 1, 0.3, 1),
    transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

[data-vp-reveal="20"] { --vp-reveal-distance: 20px; }
[data-vp-reveal="40"] { --vp-reveal-distance: 40px; }

article[hidden],
figure[hidden] {
  display: none !important;
}

[data-vp-service-count] {
  display: none !important;
}

.vp-site-lightbox[hidden],
.vp-mobile-menu[hidden],
.vp-faq-answer[hidden] {
  display: none;
}

.vp-site-lightbox {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 72px 24px 48px;
  background: rgba(3, 15, 29, 0.94);
  backdrop-filter: blur(10px);
}

.vp-site-lightbox figure {
  display: flex;
  max-width: min(1180px, 94vw);
  max-height: 86vh;
  flex-direction: column;
  align-items: center;
}

.vp-site-lightbox img {
  display: block;
  max-width: 100%;
  max-height: 78vh;
  border-radius: 24px;
  object-fit: contain;
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.45);
}

.vp-site-lightbox figcaption {
  margin-top: 14px;
  color: #fff;
  font-size: 16px;
  font-weight: 800;
  text-align: center;
}

.vp-site-lightbox-close {
  position: absolute;
  top: 18px;
  right: 22px;
  display: grid;
  width: 48px;
  height: 48px;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  font-size: 32px;
  line-height: 1;
  cursor: pointer;
}

.vp-mobile-menu {
  position: fixed;
  inset: 0;
  z-index: 10000;
}

.vp-mobile-menu-backdrop {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  background: rgba(7, 26, 51, 0.76);
  backdrop-filter: blur(6px);
}

.vp-mobile-menu aside {
  position: absolute;
  top: 0;
  right: 0;
  display: flex;
  width: min(78%, 320px);
  height: 100%;
  flex-direction: column;
  padding: 24px;
  background: #071a33;
  animation: vp-menu-in 0.35s cubic-bezier(0.16, 1, 0.3, 1) both;
}

@keyframes vp-menu-in {
  from { transform: translateX(100%); }
  to { transform: translateX(0); }
}

.vp-mobile-menu-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 32px;
}

.vp-mobile-menu-top img {
  width: 48px;
  height: 48px;
  border-radius: 999px;
  background: #fff;
  object-fit: contain;
}

.vp-mobile-menu-top button {
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  font-size: 28px;
}

.vp-mobile-menu nav {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.vp-mobile-menu nav a {
  border-radius: 12px;
  padding: 14px 16px;
  color: rgba(255, 255, 255, 0.9);
  font-weight: 700;
}

.vp-mobile-whatsapp {
  margin-top: auto;
  border-radius: 999px;
  padding: 16px 20px;
  background: #22c55e;
  color: #fff;
  font-weight: 800;
  text-align: center;
}

.vp-faq-answer {
  overflow: hidden;
  animation: vp-faq-in 0.3s ease both;
}

@keyframes vp-faq-in {
  from { opacity: 0; transform: translateY(-6px); }
  to { opacity: 1; transform: none; }
}

/* Mobile hero 2026: full-screen real projects with service-specific copy. */
.vp-mobile-story {
  display: none;
}

@media (max-width: 767px) {
  .vp-service-filter-grid {
    display: grid !important;
    width: 100%;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: stretch !important;
    justify-content: stretch !important;
    gap: 10px !important;
  }

  .vp-service-filter-grid button {
    display: flex;
    width: 100%;
    min-width: 0;
    min-height: 46px;
    align-items: center;
    justify-content: center;
    padding: 10px 12px !important;
    font-size: clamp(0.78rem, 3.55vw, 0.9rem);
    line-height: 1.15;
    text-align: center;
    white-space: nowrap;
  }

  .vp-service-filter-all {
    grid-column: 1 / -1;
  }

  #inicio {
    min-height: 100svh;
    height: 100dvh;
    overflow: hidden;
    background: #020817;
  }

  .vp-mobile-legacy-layer,
  .vp-mobile-legacy-content {
    display: none !important;
  }

  .vp-mobile-story {
    position: absolute;
    inset: 0;
    z-index: 8;
    display: block;
    width: 100%;
    min-height: 100svh;
    height: 100dvh;
    overflow: hidden;
    background: #020817;
    color: #fff;
    isolation: isolate;
    touch-action: pan-y;
  }

  .vp-mobile-story-slides,
  .vp-mobile-story-slide,
  .vp-mobile-story-slide img,
  .vp-mobile-story-shade {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
  }

  .vp-mobile-story-slide {
    z-index: 0;
    margin: 0;
    opacity: 0;
    overflow: hidden;
    transition: opacity 0.95s cubic-bezier(0.22, 1, 0.36, 1);
    will-change: opacity;
  }

  .vp-mobile-story-slide img {
    display: block;
    object-fit: cover;
    transform: scale(1.015);
    filter: saturate(1.03) contrast(1.02);
    will-change: transform;
  }

  .vp-mobile-story-slide-active {
    z-index: 1;
    opacity: 1;
  }

  .vp-mobile-story-slide-active img {
    animation: vp-mobile-cinematic 6.2s ease-out both;
  }

  @keyframes vp-mobile-cinematic {
    from { transform: scale(1.015); }
    to { transform: scale(1.065); }
  }

  .vp-mobile-story-shade {
    z-index: 2;
    pointer-events: none;
    background:
      linear-gradient(180deg, rgba(2, 8, 23, 0.58) 0%, rgba(2, 8, 23, 0.08) 24%, rgba(2, 8, 23, 0.05) 45%, rgba(2, 8, 23, 0.78) 75%, #020817 100%),
      linear-gradient(90deg, rgba(2, 8, 23, 0.22) 0%, transparent 55%, rgba(2, 8, 23, 0.12) 100%);
  }

  .vp-mobile-story-content {
    position: relative;
    z-index: 3;
    display: flex;
    width: 100%;
    height: 100%;
    min-height: 100svh;
    flex-direction: column;
    justify-content: flex-end;
    padding: 92px 20px calc(22px + env(safe-area-inset-bottom, 0px));
    pointer-events: none;
  }

  .vp-mobile-story-progress {
    display: flex;
    width: 100%;
    max-width: 520px;
    align-items: center;
    gap: 4px;
    margin: 0 auto 13px;
    pointer-events: auto;
  }

  .vp-mobile-story-step {
    display: flex;
    min-width: 0;
    height: 20px;
    flex: 1 1 0;
    align-items: center;
    padding: 0;
    border: 0;
    background: transparent;
    cursor: pointer;
  }

  .vp-mobile-story-step span {
    display: block;
    width: 100%;
    height: 3px;
    border-radius: 99px;
    background: rgba(255, 255, 255, 0.38);
    box-shadow: 0 1px 8px rgba(0, 0, 0, 0.25);
    transition: background 0.35s ease, transform 0.35s ease;
    transform-origin: left center;
  }

  .vp-mobile-story-step-active span {
    background: #fff;
    transform: scaleY(1.65);
  }

  .vp-mobile-story-copy {
    width: 100%;
    max-width: 520px;
    margin: 0 auto;
    opacity: 1;
    transform: none;
    transition: opacity 0.24s ease, transform 0.24s ease;
  }

  .vp-mobile-story-copy-changing {
    opacity: 0;
    transform: translateY(10px);
  }

  .vp-mobile-story-meta {
    display: flex;
    min-width: 0;
    align-items: center;
    gap: 8px;
    color: rgba(255, 255, 255, 0.84);
    font-size: 0.68rem;
    font-weight: 800;
    line-height: 1;
    letter-spacing: 0.13em;
    text-transform: uppercase;
    text-shadow: 0 2px 12px rgba(0, 0, 0, 0.45);
  }

  .vp-mobile-story-live {
    width: 7px;
    height: 7px;
    flex: 0 0 7px;
    border-radius: 50%;
    background: #22c55e;
    box-shadow: 0 0 0 5px rgba(34, 197, 94, 0.14), 0 0 18px rgba(34, 197, 94, 0.7);
  }

  .vp-mobile-story-counter {
    margin-left: auto;
    color: rgba(255, 255, 255, 0.64);
    letter-spacing: 0.08em;
    white-space: nowrap;
  }

  .vp-mobile-story-copy h1 {
    max-width: 13ch;
    margin: 12px 0 0;
    color: #fff;
    font-size: clamp(2.15rem, 10.6vw, 3.55rem);
    font-weight: 900;
    line-height: 0.94;
    letter-spacing: -0.045em;
    text-wrap: balance;
    text-shadow: 0 3px 24px rgba(0, 0, 0, 0.5);
  }

  .vp-mobile-story-copy > p {
    max-width: 40rem;
    margin: 13px 0 0;
    color: rgba(255, 255, 255, 0.84);
    font-size: clamp(0.87rem, 3.65vw, 1rem);
    font-weight: 500;
    line-height: 1.48;
    text-shadow: 0 2px 14px rgba(0, 0, 0, 0.55);
  }

  .vp-mobile-story-actions {
    display: grid;
    grid-template-columns: 0.88fr 1.12fr;
    gap: 8px;
    margin-top: 17px;
    pointer-events: auto;
  }

  .vp-mobile-story-actions a {
    display: inline-flex;
    min-height: 48px;
    align-items: center;
    justify-content: center;
    border-radius: 14px;
    padding: 11px 12px;
    font-size: clamp(0.74rem, 3.25vw, 0.9rem);
    font-weight: 850;
    line-height: 1.1;
    text-align: center;
    transition: transform 0.2s ease, background 0.2s ease;
  }

  .vp-mobile-story-actions a:active {
    transform: scale(0.97);
  }

  .vp-mobile-story-primary {
    border: 1px solid #fff;
    background: #fff;
    color: #071a33;
    box-shadow: 0 12px 35px -18px rgba(0, 0, 0, 0.75);
  }

  .vp-mobile-story-secondary {
    border: 1px solid rgba(255, 255, 255, 0.38);
    background: rgba(7, 26, 51, 0.46);
    color: #fff;
    box-shadow: inset 0 1px rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(14px);
  }

  .vp-floating-whatsapp {
    opacity: 0 !important;
    pointer-events: none !important;
    transform: translateY(16px) scale(0.86) !important;
    transition: opacity 0.3s ease, transform 0.3s ease !important;
  }

  .vp-floating-whatsapp-visible {
    opacity: 1 !important;
    pointer-events: auto !important;
    transform: none !important;
  }
}

@media (max-width: 374px), (max-height: 700px) and (max-width: 767px) {
  .vp-mobile-story-content {
    padding-right: 16px;
    padding-bottom: calc(14px + env(safe-area-inset-bottom, 0px));
    padding-left: 16px;
  }

  .vp-mobile-story-progress {
    margin-bottom: 8px;
  }

  .vp-mobile-story-copy h1 {
    margin-top: 8px;
    font-size: clamp(1.85rem, 9.8vw, 2.5rem);
  }

  .vp-mobile-story-copy > p {
    margin-top: 9px;
    font-size: 0.8rem;
    line-height: 1.4;
  }

  .vp-mobile-story-actions {
    margin-top: 12px;
  }

  .vp-mobile-story-actions a {
    min-height: 44px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
