/**
 * Aplitek — estilos de marca (Bootstrap + Roboto local).
 * Paleta: navy #1A377D, acento #3F6CB5
 */
:root {
  --ap-navy: #1a377d;
  --ap-blue: #3f6cb5;
  --ap-navy-dark: #0f2454;
  --ap-surface: #f4f7fc;
  --ap-text: #1b2230;
  --ap-gradient: linear-gradient(105deg, var(--ap-blue) 0%, var(--ap-navy) 100%);
  --ap-header-h: 4.25rem;
  --ap-radius: 0.75rem;
  --ap-shadow: 0 12px 40px rgba(26, 55, 125, 0.12);
}

html {
  scroll-padding-top: calc(var(--ap-header-h) + 0.5rem);
}

section.scroll-mt {
  scroll-margin-top: calc(var(--ap-header-h) + 1rem);
}

body {
  font-family: "Roboto", system-ui, sans-serif;
  color: var(--ap-text);
  background: #fff;
  overflow-x: hidden;
}

.ap-display {
  font-family: "Roboto", system-ui, sans-serif;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.15;
}

.text-ap-navy {
  color: var(--ap-navy);
}

.text-gradient {
  background: var(--ap-gradient);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.bg-ap-surface {
  background: var(--ap-surface);
}

.ap-footer {
  background: linear-gradient(135deg, var(--ap-navy-dark), var(--ap-navy));
}

.border-white-10 {
  border-color: rgba(255, 255, 255, 0.12) !important;
}

.navbar-brand img {
  height: 44px;
  width: auto;
}

.navbar {
  transition: box-shadow 0.35s ease, background-color 0.35s ease;
}

.navbar.ap-scrolled {
  box-shadow: var(--ap-shadow);
  background-color: rgba(255, 255, 255, 0.96) !important;
  backdrop-filter: blur(8px);
}

.btn-ap-primary {
  --bs-btn-color: #fff;
  --bs-btn-bg: var(--ap-navy);
  --bs-btn-border-color: var(--ap-navy);
  --bs-btn-hover-bg: var(--ap-navy-dark);
  --bs-btn-hover-border-color: var(--ap-navy-dark);
  --bs-btn-active-bg: var(--ap-navy-dark);
  --bs-btn-active-border-color: var(--ap-navy-dark);
  background-image: var(--ap-gradient);
  border: 0;
  position: relative;
  overflow: hidden;
}

.btn-ap-primary::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, transparent, rgba(255, 255, 255, 0.25), transparent);
  transform: translateX(-120%);
  transition: transform 0.6s ease;
}

.btn-ap-primary:hover::after,
.btn-ap-primary:focus-visible::after {
  transform: translateX(120%);
}

.btn-ap-outline {
  color: var(--ap-navy);
  border-color: var(--ap-navy);
}

.btn-ap-outline:hover {
  color: #fff;
  background: var(--ap-navy);
  border-color: var(--ap-navy);
}

.ap-tri-gradient {
  width: 88px;
  height: 88px;
  background: var(--ap-gradient);
  clip-path: polygon(50% 0%, 0% 100%, 100% 100%);
}

.ap-hero {
  position: relative;
  min-height: clamp(520px, 78vh, 820px);
  display: flex;
  align-items: center;
  isolation: isolate;
}

.ap-hero::before {
  content: "";
  position: absolute;
  inset: -20% -10% auto -10%;
  height: 70%;
  background: radial-gradient(ellipse at 30% 20%, rgba(63, 108, 181, 0.35), transparent 55%),
    radial-gradient(ellipse at 80% 10%, rgba(26, 55, 125, 0.2), transparent 50%);
  z-index: -1;
  animation: ap-float-bg 18s ease-in-out infinite alternate;
}

@keyframes ap-float-bg {
  from {
    transform: translateY(0) scale(1);
  }
  to {
    transform: translateY(-18px) scale(1.03);
  }
}

.ap-hero-grid {
  position: absolute;
  inset: 0;
  z-index: -1;
  opacity: 0.08;
  background-image: linear-gradient(var(--ap-navy) 1px, transparent 1px),
    linear-gradient(90deg, var(--ap-navy) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(ellipse at 50% 30%, black, transparent 70%);
}

.ap-hero .row > [class*="col-"] {
  min-width: 0;
}

figure.ap-lead-media {
  display: block;
  min-width: 0;
  width: 100%;
}

figure.ap-lead-media > img {
  display: block;
  width: 100%;
  max-width: 100%;
  height: auto;
  max-height: min(68vh, 580px);
}

main section img.w-100 {
  height: auto;
}

[data-reveal] {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.7s cubic-bezier(0.22, 1, 0.36, 1), transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
}

[data-reveal].is-visible {
  opacity: 1;
  transform: none;
}

[data-reveal="left"] {
  transform: translateX(-36px);
}

[data-reveal="right"] {
  transform: translateX(36px);
}

[data-reveal="left"].is-visible,
[data-reveal="right"].is-visible {
  transform: none;
}

.ap-card {
  border: 1px solid rgba(26, 55, 125, 0.08);
  border-radius: var(--ap-radius);
  box-shadow: var(--ap-shadow);
  transition: transform 0.35s ease, box-shadow 0.35s ease;
  background: #fff;
}

.ap-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 20px 50px rgba(26, 55, 125, 0.16);
}

.ap-card-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: var(--ap-gradient);
  display: grid;
  place-items: center;
  color: #fff;
  font-size: 1.25rem;
}

.ap-gallery-item {
  position: relative;
  border-radius: var(--ap-radius);
  overflow: hidden;
  cursor: zoom-in;
}

.ap-gallery-item img {
  width: 100%;
  height: auto;
  display: block;
  transition: transform 0.55s ease;
}

.ap-gallery-item:hover img {
  transform: scale(1.06);
}

.ap-gallery-item::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 40%, rgba(15, 36, 84, 0.55));
  opacity: 0;
  transition: opacity 0.35s ease;
}

.ap-gallery-item:hover::after {
  opacity: 1;
}

.ap-stat-number {
  font-variant-numeric: tabular-nums;
  font-size: clamp(2rem, 4vw, 2.75rem);
  font-weight: 700;
  color: var(--ap-navy);
}

.ap-scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  width: 0;
  z-index: 1080;
  background: var(--ap-gradient);
  transition: width 0.12s linear;
}

.ap-wa-fab {
  position: fixed;
  right: 1rem;
  bottom: 1rem;
  z-index: 1040;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: #25d366;
  color: #fff;
  box-shadow: 0 10px 30px rgba(37, 211, 102, 0.45);
  transition: transform 0.25s ease;
}

.ap-wa-fab:hover {
  transform: scale(1.06);
  color: #fff;
}

.ap-slant {
  clip-path: polygon(0 12%, 100% 0, 100% 100%, 0 100%);
  padding-top: 4rem;
  margin-top: -3rem;
}

footer a {
  color: rgba(255, 255, 255, 0.85);
}

footer a:hover {
  color: #fff;
}

footer.ap-footer a.ap-mvisual-badge,
footer.ap-footer a.ap-mvisual-badge:hover,
footer.ap-footer a.ap-mvisual-badge:focus-visible {
  color: var(--ap-navy);
}

footer.ap-footer .ap-footer-brand > a.ap-footer-logo-wrap {
  display: inline-block;
  padding: 8px;
  background-color: #ffffff;
  border-radius: var(--ap-radius);
  line-height: 0;
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.28);
}

footer.ap-footer .ap-footer-brand > a.ap-footer-logo-wrap:hover {
  box-shadow: 0 6px 22px rgba(0, 0, 0, 0.34);
}

footer.ap-footer .ap-footer-brand > a.ap-footer-logo-wrap:focus-visible {
  outline: 3px solid rgba(255, 255, 255, 0.65);
  outline-offset: 4px;
}

footer.ap-footer .ap-footer-brand img.ap-footer-logo {
  height: 44px;
  width: auto;
  max-height: 44px;
  max-width: 176px;
  object-fit: contain;
  display: block;
}

.ap-footer-touch {
  display: flex;
  flex-direction: column;
  gap: 0.125rem;
}

.ap-footer-touch-link {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0 -0.125rem;
  padding: 0.28rem 0.35rem;
  border-radius: 0.375rem;
  color: rgba(255, 255, 255, 0.92);
  text-decoration: none;
  font-size: 0.8125rem;
  font-weight: 500;
  line-height: 1.25;
  letter-spacing: 0.01em;
  transition: background-color 0.18s ease, color 0.18s ease;
}

.ap-footer-touch-link:hover {
  color: #fff;
  background-color: rgba(255, 255, 255, 0.07);
}

.ap-footer-touch-ic {
  flex-shrink: 0;
  width: 1.5rem;
  height: 1.5rem;
  border-radius: 0.375rem;
  background: rgba(255, 255, 255, 0.09);
  display: grid;
  place-items: center;
  color: rgba(255, 255, 255, 0.82);
  transition: background-color 0.18s ease, color 0.18s ease;
}

.ap-footer-touch-ic svg {
  width: 13px;
  height: 13px;
  display: block;
}

.ap-footer-touch-link:hover .ap-footer-touch-ic {
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
}

.ap-lightbox-img {
  max-width: 100%;
  height: auto;
  max-height: min(85vh, 920px);
  width: auto;
  display: block;
  margin-inline: auto;
}

.tracking-wide {
  letter-spacing: 0.08em;
}

.ap-hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  background: rgba(26, 55, 125, 0.06);
  border: 1px solid rgba(26, 55, 125, 0.12);
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  color: var(--ap-navy);
}

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

  [data-reveal] {
    opacity: 1;
    transform: none;
  }

  .ap-hero::before {
    animation: none;
  }
}

:focus-visible {
  outline: 3px solid rgba(63, 108, 181, 0.55);
  outline-offset: 2px;
}

.ap-nav-cta--current {
  box-shadow: 0 0 0 0.2rem rgba(26, 55, 125, 0.35);
}

.ap-footer-dev {
  line-height: 1.4;
}

.ap-mvisual-badge {
  display: inline-flex;
  align-items: center;
  gap: 0;
  padding: 0.28rem 0.7rem;
  border-radius: 999px;
  background: linear-gradient(135deg, #fff 0%, rgba(255, 255, 255, 0.9) 100%);
  color: var(--ap-navy);
  font-weight: 700;
  font-size: 0.75rem;
  letter-spacing: 0.03em;
  line-height: 1.2;
  box-shadow: 0 2px 14px rgba(0, 0, 0, 0.18);
  overflow: hidden;
  transition: transform 0.28s ease, box-shadow 0.28s ease, background 0.28s ease;
}

.ap-mvisual-badge__brand {
  display: inline-block;
  transition: transform 0.32s cubic-bezier(0.22, 1, 0.36, 1);
}

.ap-mvisual-badge__cta {
  display: inline-block;
  max-width: 0;
  opacity: 0;
  overflow: hidden;
  white-space: nowrap;
  font-weight: 600;
  color: var(--ap-blue);
  transform: scale(1.45);
  transform-origin: left center;
  transition:
    max-width 0.4s cubic-bezier(0.22, 1, 0.36, 1),
    opacity 0.32s ease,
    margin 0.4s cubic-bezier(0.22, 1, 0.36, 1),
    transform 0.38s cubic-bezier(0.22, 1, 0.36, 1);
}

.ap-mvisual-badge__cta::after {
  content: " →";
  opacity: 0.85;
}

.ap-mvisual-badge:hover,
.ap-mvisual-badge:focus-visible {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.24);
  background: linear-gradient(135deg, #fff 0%, #f0f5ff 100%);
  color: var(--ap-navy);
}

.ap-mvisual-badge:hover .ap-mvisual-badge__cta,
.ap-mvisual-badge:focus-visible .ap-mvisual-badge__cta {
  max-width: 6.25rem;
  opacity: 1;
  margin-left: 0.4rem;
  transform: scale(1);
}

.ap-mvisual-badge:hover .ap-mvisual-badge__brand,
.ap-mvisual-badge:focus-visible .ap-mvisual-badge__brand {
  transform: scale(1.02);
}

.ap-mvisual-badge:focus-visible {
  outline: 3px solid rgba(255, 255, 255, 0.55);
  outline-offset: 3px;
}

/* —— Responsive (mobile / tablet) —— */

@media (max-width: 991.98px) {
  #mainNav .nav-link {
    padding-top: 0.65rem;
    padding-bottom: 0.65rem;
  }

  #mainNav .btn-ap-primary {
    width: 100%;
    margin-top: 0.35rem;
    min-height: 2.75rem;
  }

  .ap-cta-actions {
    align-items: stretch;
  }

  .ap-cta-actions .btn {
    width: 100%;
    margin-right: 0 !important;
  }
}

@media (max-width: 575.98px) {
  :root {
    --ap-header-h: 3.75rem;
  }

  .navbar-brand img {
    height: 36px;
  }

  .ap-hero {
    min-height: auto;
  }

  .ap-hero .display-4,
  .ap-hero .display-5,
  main .display-5 {
    font-size: clamp(1.65rem, 7vw, 2.25rem);
  }

  .ap-hero .lead {
    font-size: 1rem;
  }

  .ap-stats .ap-stat-number {
    font-size: clamp(1.45rem, 5.5vw, 1.85rem);
  }

  .ap-stats .small {
    font-size: 0.6875rem;
    line-height: 1.35;
  }

  .ap-slant {
    clip-path: polygon(0 6%, 100% 0, 100% 100%, 0 100%);
    padding-top: 2.5rem;
    margin-top: -1.5rem;
  }

  .ap-wa-fab {
    right: 0.75rem;
    bottom: 0.75rem;
    width: 52px;
    height: 52px;
  }

  .ap-footer-touch-link {
    min-height: 2.75rem;
    padding-top: 0.45rem;
    padding-bottom: 0.45rem;
  }

  .ap-footer {
    padding-bottom: 5rem;
  }

  .ap-hero-actions .btn-lg {
    width: 100%;
  }
}

@media (min-width: 576px) and (max-width: 991.98px) {
  .ap-hero {
    min-height: clamp(420px, 65vh, 680px);
  }
}
