/* =====================================================
   VARIABLES
===================================================== */

:root {
  --primary: #071a2f;
  --primary-dark: #04101e;
  --secondary: #0d6efd;
  --accent: #39d0ff;
  --accent-light: #8be8ff;

  --surface: #ffffff;
  --surface-soft: #f3f7fb;

  --text: #172333;
  --muted: #617084;
  --line: #dbe5ef;
  --white: #ffffff;
  --success: #25d366;

  --shadow: 0 18px 45px rgba(4, 16, 30, 0.13);
  --radius: 22px;

  --font-sans: "Inter", ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-serif: "Lora", Georgia, "Times New Roman", serif;
}


/* =====================================================
   FUENTES LOCALES (carpeta fonts/, licencia SIL OFL 1.1)
   - Inter: textos y títulos del sitio
   - Lora: títulos elegantes de la galería
   Solo se incluyen los caracteres del español y del inglés
   para que pesen poco (≈26 KB cada archivo).
===================================================== */

@font-face {
  font-family: "Inter";
  src: url("fonts/inter/inter-400.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Inter";
  src: url("fonts/inter/inter-500.woff2") format("woff2");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Inter";
  src: url("fonts/inter/inter-600.woff2") format("woff2");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Inter";
  src: url("fonts/inter/inter-700.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Inter";
  src: url("fonts/inter/inter-800.woff2") format("woff2");
  font-weight: 800;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Inter";
  src: url("fonts/inter/inter-900.woff2") format("woff2");
  font-weight: 900;
  font-style: normal;
  font-display: swap;
}

/* Lora es variable: un solo archivo cubre del 400 al 700 */
@font-face {
  font-family: "Lora";
  src: url("fonts/lora/lora-variable.woff2") format("woff2");
  font-weight: 400 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Lora";
  src: url("fonts/lora/lora-italic-variable.woff2") format("woff2");
  font-weight: 400 700;
  font-style: italic;
  font-display: swap;
}


/* =====================================================
   CONFIGURACIÓN GENERAL
===================================================== */

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 90px;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  /* "clip" evita el desplazamiento lateral sin romper el encabezado fijo (sticky) */
  overflow-x: hidden;
  overflow-x: clip;
  -webkit-font-smoothing: antialiased;
  color: var(--text);
  background: var(--surface-soft);
  font-family: var(--font-sans);
}

a {
  color: inherit;
  text-decoration: none;
}

img,
svg,
video {
  max-width: 100%;
  height: auto;
}

button,
input,
textarea,
select {
  font: inherit;
}

/* El atributo hidden siempre debe ocultar, aunque la clase tenga display */
[hidden] {
  display: none !important;
}

.page {
  width: min(1160px, calc(100% - 32px));
  margin: 0 auto;
}


/* =====================================================
   ENCABEZADO Y NAVEGACIÓN
===================================================== */

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.96);
  border-bottom: 1px solid rgba(7, 26, 47, 0.09);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
}

.navbar {
  position: relative;
  min-height: 76px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand {
  display: flex;
  align-items: center;
  /* El logo se alinea a la izquierda y se mide por su altura:
     el ancho sale solo, sin deformar ni estirar el dibujo. */
  flex: 0 1 auto;
  min-width: 0;
  margin-right: auto;
  border-radius: 8px;
}

.brand__logo {
  display: block;
  width: auto;
  height: 50px;
  max-width: 100%;
  /* Es un SVG vectorial: se ve nítido en cualquier tamaño de pantalla */
  shape-rendering: geometricPrecision;
}

.brand:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 4px;
}

.navbar__links {
  display: flex;
  align-items: center;
  gap: 26px;
}

.navbar__link {
  color: #31465d;
  font-size: 14px;
  font-weight: 700;
  transition:
    color 0.2s ease,
    background-color 0.2s ease;
}

.navbar__link:hover {
  color: var(--secondary);
}

/* Página actual (por ejemplo, "Galería" dentro de la galería) */
.navbar__link[aria-current="page"] {
  color: var(--secondary);
  box-shadow: inset 0 -2px 0 currentColor;
}

.navbar__cta {
  min-height: 43px;
  padding: 11px 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: 12px;
  color: var(--white);
  background: var(--primary);
}

.navbar__cta:hover {
  color: var(--white);
  background: var(--secondary);
}

.navbar__cta .bi {
  font-size: 1.1em;
  line-height: 1;
}


/* Botón del menú móvil */

.navbar__toggle {
  display: none;
  width: 46px;
  height: 46px;
  padding: 0;
  flex: 0 0 46px;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  border-radius: 12px;
  color: var(--primary);
  background: var(--surface);
  font-size: 1.7rem;
  cursor: pointer;
}

.navbar__toggle:hover {
  color: var(--secondary);
  border-color: var(--secondary);
}

.navbar__toggle:focus-visible {
  outline: 3px solid rgba(13, 110, 253, 0.3);
  outline-offset: 3px;
}


/* =====================================================
   BOTONES
===================================================== */

.button {
  min-height: 51px;
  padding: 0 20px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border: 0;
  border-radius: 14px;
  cursor: pointer;
  font-weight: 800;
  text-align: center;
  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease;
}

.button:hover {
  transform: translateY(-2px);
}

.button:focus-visible {
  outline: 3px solid rgba(139, 232, 255, 0.55);
  outline-offset: 3px;
}

.button .bi {
  font-size: 1.1em;
  line-height: 1;
}

.button--accent {
  color: #04213a;
  background: linear-gradient(
    135deg,
    var(--accent-light),
    var(--accent)
  );
  box-shadow: 0 14px 30px rgba(57, 208, 255, 0.22);
}

.button--primary {
  color: var(--white);
  background: linear-gradient(135deg, #0b3a6e, var(--primary));
  box-shadow: 0 14px 30px rgba(7, 26, 47, 0.25);
}

.button--primary .bi {
  transition: transform 0.25s ease;
}

.button--primary:hover .bi {
  transform: translateX(4px);
}

.button--outline {
  color: var(--white);
  border: 1px solid rgba(255, 255, 255, 0.27);
  background: rgba(255, 255, 255, 0.08);
}


/* =====================================================
   HERO
===================================================== */

.hero {
  position: relative;
  overflow: hidden;
  color: var(--white);
  background:
    radial-gradient(
      circle at 82% 18%,
      rgba(57, 208, 255, 0.22),
      transparent 25%
    ),
    radial-gradient(
      circle at 8% 92%,
      rgba(13, 110, 253, 0.3),
      transparent 30%
    ),
    linear-gradient(
      125deg,
      var(--primary-dark),
      var(--primary) 58%,
      #0d4f8f
    );
}

.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0.15;
  pointer-events: none;
  background-image:
    linear-gradient(
      rgba(255, 255, 255, 0.08) 1px,
      transparent 1px
    ),
    linear-gradient(
      90deg,
      rgba(255, 255, 255, 0.08) 1px,
      transparent 1px
    );
  background-size: 46px 46px;
}

.hero__content {
  position: relative;
  z-index: 2;
  min-height: 650px;
  padding: 88px 0 78px;
  display: grid;
  grid-template-columns: 1.14fr 0.86fr;
  align-items: center;
  gap: 50px;
}

.hero__badge {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 8px 13px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 999px;
  color: #dff8ff;
  background: rgba(255, 255, 255, 0.08);
  font-size: 13px;
  font-weight: 750;
}

.hero__badge-dot {
  width: 8px;
  height: 8px;
  flex: 0 0 8px;
  border-radius: 50%;
  background: var(--accent-light);
  box-shadow: 0 0 0 5px rgba(139, 232, 255, 0.12);
}

.hero__title {
  max-width: 760px;
  margin: 22px 0 20px;
  font-size: clamp(43px, 6.2vw, 76px);
  line-height: 1.02;
  letter-spacing: -3px;
}

.hero__title-accent {
  color: var(--accent-light);
}

.hero__description {
  max-width: 680px;
  margin: 0;
  color: rgba(255, 255, 255, 0.78);
  font-size: 18px;
  line-height: 1.75;
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 13px;
  margin-top: 31px;
}


/* =====================================================
   TARJETA DE CONTACTO DEL HERO
===================================================== */

.contact-card {
  padding: 29px;
  border: 1px solid rgba(255, 255, 255, 0.17);
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.09);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.2);
  -webkit-backdrop-filter: blur(13px);
  backdrop-filter: blur(13px);
}

.contact-card__label {
  color: var(--accent-light);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 1.4px;
  text-transform: uppercase;
}

.contact-card__title {
  margin: 10px 0;
  font-size: 29px;
}

.contact-card__description {
  margin: 0;
  color: rgba(255, 255, 255, 0.72);
  line-height: 1.65;
}

.contact-list {
  display: grid;
  gap: 12px;
  margin-top: 24px;
}

.contact-item {
  display: flex;
  align-items: flex-start;
  gap: 13px;
  padding: 14px;
  border-radius: 16px;
  background: rgba(0, 0, 0, 0.15);
}

.contact-item__icon {
  width: 40px;
  height: 40px;
  flex: 0 0 40px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: rgba(139, 232, 255, 0.14);
}

.contact-item > div {
  min-width: 0;
  line-height: 1.5;
  overflow-wrap: anywhere;
}

.contact-item a {
  color: var(--accent-light);
}

.contact-item a:hover {
  text-decoration: underline;
}

.contact-item__icon .bi {
  color: var(--accent-light);
}

.contact-item__label {
  display: block;
  margin-bottom: 3px;
  color: rgba(255, 255, 255, 0.58);
}


/* =====================================================
   SECCIONES GENERALES
===================================================== */

.section {
  padding: 82px 0;
}

.section--services {
  background: #eaf2fa;
}

.section__header {
  max-width: 780px;
  margin-bottom: 34px;
}

.section__eyebrow {
  margin-bottom: 9px;
  color: var(--secondary);
  font-size: 12px;
  font-weight: 850;
  letter-spacing: 1.6px;
  text-transform: uppercase;
}

.section__title {
  margin: 0 0 13px;
  color: var(--primary-dark);
  font-size: clamp(31px, 4.5vw, 48px);
  line-height: 1.1;
  letter-spacing: -1.8px;
}

.section__description {
  margin: 0;
  color: var(--muted);
  font-size: 17px;
  line-height: 1.75;
}


/* =====================================================
   NOSOTROS
===================================================== */

.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 28px;
}

.about-card,
.values-card {
  padding: 34px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.about-card__paragraph {
  margin: 0 0 16px;
  color: var(--muted);
  line-height: 1.8;
}

.about-card__paragraph:last-child {
  margin-bottom: 0;
}

.values-card {
  color: var(--white);
  background: linear-gradient(
    145deg,
    var(--primary),
    var(--primary-dark)
  );
}

.values-card__title {
  margin: 0 0 22px;
  font-size: 25px;
}

.values-list {
  display: grid;
  gap: 16px;
}

.value-item {
  display: grid;
  grid-template-columns: 42px 1fr;
  align-items: start;
  gap: 13px;
}

.value-item__mark {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  color: var(--primary-dark);
  background: var(--accent-light);
  font-weight: 900;
}

.value-item__title {
  display: block;
  margin-bottom: 4px;
}

.value-item__description {
  margin: 0;
  color: rgba(255, 255, 255, 0.68);
  font-size: 14px;
  line-height: 1.5;
}


/* =====================================================
   SERVICIOS
===================================================== */

.services-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}

.service-card {
  min-height: 255px;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: 0 12px 28px rgba(7, 26, 47, 0.06);
  transition:
    transform 0.22s ease,
    box-shadow 0.22s ease,
    border-color 0.22s ease;
}

.service-card:hover {
  transform: translateY(-6px);
  border-color: rgba(13, 110, 253, 0.38);
  box-shadow: var(--shadow);
}

.service-card__icon {
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  border-radius: 15px;
  color: var(--primary);
  background: #e7f4fb;
  font-size: 27px;
}

.service-card__title {
  margin: 20px 0 10px;
  color: var(--primary);
  font-size: 20px;
}

.service-card__description {
  margin: 0;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.7;
}

.services-cta {
  margin-top: 26px;
  padding: 24px 28px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  border-radius: 20px;
  color: var(--white);
  background: linear-gradient(
    120deg,
    var(--primary),
    var(--secondary)
  );
}

.services-cta__title {
  margin: 0 0 6px;
}

.services-cta__description {
  margin: 0;
  color: rgba(255, 255, 255, 0.72);
}


/* =====================================================
   CARRUSEL DE PROYECTOS
===================================================== */

.projects {
  margin-top: 64px;
  scroll-margin-top: 90px;
}

.projects__header {
  margin-inline: auto;
  text-align: center;
}

.projects__more {
  margin-top: 28px;
  display: flex;
  justify-content: center;
}

.carousel {
  position: relative;
  width: min(100%, 980px);
  margin: 0 auto;
  overflow: hidden;
  border-radius: 26px;
  background: var(--primary-dark);
  box-shadow: var(--shadow);
  outline: none;
  isolation: isolate;
  /* Evita el zoom por doble toque y el resaltado azul en móviles */
  touch-action: pan-y;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
}

.carousel:focus-visible {
  box-shadow:
    0 0 0 4px rgba(13, 110, 253, 0.35),
    var(--shadow);
}

.carousel__viewport {
  width: 100%;
  overflow: hidden;
}

.carousel__track {
  display: flex;
  width: 100%;
  transition: transform 0.6s cubic-bezier(0.22, 0.61, 0.36, 1);
  will-change: transform;
}

.carousel__track--dragging {
  transition: none;
}

.carousel__slide {
  position: relative;
  flex: 0 0 100%;
  min-width: 0;
  margin: 0;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: var(--primary-dark);
}

/* Fondo difuminado con la misma foto (rellena los bordes sin recortar la foto) */
.carousel__backdrop {
  position: absolute;
  inset: -40px;
  z-index: 0;
  background-position: center;
  background-size: cover;
  filter: blur(28px) brightness(0.55) saturate(1.2);
  transform: scale(1.1);
}

/* La foto se muestra completa, sin recortes, en cualquier pantalla */
.carousel__image {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: block;
  width: 100%;
  height: 100%;
  max-width: none;
  object-fit: contain;
  object-position: center;
  opacity: 0;
  transition: opacity 0.45s ease;
}

.carousel__slide--loaded .carousel__image {
  opacity: 1;
}

/* Animación de carga mientras llega la foto */
.carousel__slide::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  z-index: 0;
  width: 38px;
  height: 38px;
  margin: -19px 0 0 -19px;
  border: 3px solid rgba(255, 255, 255, 0.2);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: carousel-spin 0.9s linear infinite;
}

.carousel__slide--loaded::before {
  display: none;
}

/* Degradado inferior para que se lean los indicadores */
.carousel__slide::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 2;
  height: 90px;
  pointer-events: none;
  background: linear-gradient(180deg, transparent, rgba(4, 16, 30, 0.6));
}

/* Mensaje de carga / sin fotos / error */
.carousel__empty {
  flex: 0 0 100%;
  aspect-ratio: 16 / 9;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  padding: 24px;
  color: rgba(255, 255, 255, 0.75);
  text-align: center;
}

.carousel__empty .bi {
  font-size: 2.6rem;
  color: var(--accent-light);
}

.carousel__empty p {
  margin: 0;
}

.carousel__spinner {
  width: 40px;
  height: 40px;
  border: 3px solid rgba(255, 255, 255, 0.2);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: carousel-spin 0.9s linear infinite;
}

@keyframes carousel-spin {
  to {
    transform: rotate(360deg);
  }
}


/* Botones anterior y siguiente */

.carousel__button {
  position: absolute;
  top: 50%;
  z-index: 5;
  width: 50px;
  height: 50px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 50%;
  color: var(--white);
  background: rgba(4, 16, 30, 0.6);
  font-size: 1.35rem;
  cursor: pointer;
  transform: translateY(-50%);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  transition:
    background-color 0.2s ease,
    transform 0.2s ease;
}

.carousel__button:hover {
  background: var(--secondary);
  transform: translateY(-50%) scale(1.07);
}

.carousel__button:active {
  transform: translateY(-50%) scale(0.95);
}

.carousel__button:focus-visible {
  outline: 3px solid var(--white);
  outline-offset: 3px;
}

.carousel__button--previous {
  left: 18px;
}

.carousel__button--next {
  right: 18px;
}


/* Contador "1 / 8" */

.carousel__counter {
  position: absolute;
  top: 16px;
  right: 16px;
  z-index: 5;
  padding: 6px 12px;
  border-radius: 999px;
  color: var(--white);
  background: rgba(4, 16, 30, 0.6);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.5px;
  font-variant-numeric: tabular-nums;
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}


/* Indicadores (si hay muchas fotos, se desplazan horizontalmente) */

.carousel__indicators {
  position: absolute;
  bottom: 18px;
  left: 50%;
  z-index: 6;
  max-width: calc(100% - 140px);
  padding: 6px 4px;
  display: flex;
  align-items: center;
  gap: 8px;
  overflow-x: auto;
  scrollbar-width: none;
  transform: translateX(-50%);
}

.carousel__indicators::-webkit-scrollbar {
  display: none;
}

.carousel__indicator {
  flex: 0 0 auto;
  width: 11px;
  height: 11px;
  padding: 0;
  border: 2px solid rgba(255, 255, 255, 0.9);
  border-radius: 999px;
  background: transparent;
  cursor: pointer;
  transition:
    width 0.25s ease,
    background-color 0.25s ease;
}

.carousel__indicator:hover {
  background: rgba(255, 255, 255, 0.5);
}

.carousel__indicator--active,
.carousel__indicator--active:hover {
  width: 30px;
  background: var(--white);
}

.carousel__indicator:focus-visible {
  outline: 3px solid var(--accent-light);
  outline-offset: 2px;
}


/* Estado accesible para lectores de pantalla */

.carousel__status {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

/* =====================================================
   SECCIÓN DE CONTACTO
===================================================== */

.contact-section {
  padding: 82px 0;
  background: var(--surface);
}

.contact-banner {
  padding: 42px;
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 34px;
  border-radius: 28px;
  color: var(--white);
  background: linear-gradient(
    125deg,
    var(--primary-dark),
    var(--primary) 62%,
    var(--secondary)
  );
  box-shadow: var(--shadow);
}

.contact-banner__title {
  margin: 0 0 10px;
  font-size: clamp(29px, 4vw, 43px);
  letter-spacing: -1px;
}

.contact-banner__description {
  max-width: 670px;
  margin: 0;
  color: rgba(255, 255, 255, 0.72);
  line-height: 1.7;
}

.contact-banner__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}


/* =====================================================
   PIE DE PÁGINA
===================================================== */

.site-footer {
  padding: 27px 0;
  color: rgba(255, 255, 255, 0.68);
  background: #03101e;
  font-size: 14px;
}

.site-footer__content {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  flex-wrap: wrap;
}


/* =====================================================
   BOTÓN FLOTANTE DE WHATSAPP
   - Ondas que se expanden (pulso continuo)
   - Sacudida del ícono cada pocos segundos
   - Globo "¿Necesita ayuda?" que aparece unos segundos al cargar y al pasar el ratón
   - Insignia de notificación que rebota
===================================================== */

.whatsapp-float {
  position: fixed;
  right: max(22px, env(safe-area-inset-right));
  bottom: max(22px, env(safe-area-inset-bottom));
  z-index: 90;
  display: flex;
  align-items: center;
  gap: 12px;
  -webkit-tap-highlight-color: transparent;
  animation: wa-enter 0.7s cubic-bezier(0.34, 1.56, 0.64, 1) 0.6s both;
}

.whatsapp-float__button {
  position: relative;
  width: 62px;
  height: 62px;
  flex: 0 0 62px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  color: var(--white);
  background: linear-gradient(145deg, #2fe476, #128c7e);
  box-shadow:
    0 10px 25px rgba(18, 140, 126, 0.45),
    inset 0 -3px 6px rgba(0, 0, 0, 0.12);
  transition:
    transform 0.25s ease,
    box-shadow 0.25s ease;
}

/* Ondas */
.whatsapp-float__button::before,
.whatsapp-float__button::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  border-radius: 50%;
  background: var(--success);
  pointer-events: none;
  animation: wa-ripple 2.4s ease-out infinite;
}

.whatsapp-float__button::after {
  animation-delay: 1.2s;
}

.whatsapp-float__button .bi {
  font-size: 1.95rem;
  line-height: 1;
  animation: wa-shake 4s ease-in-out 2s infinite;
  transform-origin: 50% 60%;
}

/* Insignia de notificación */
.whatsapp-float__badge {
  position: absolute;
  top: -2px;
  right: -2px;
  min-width: 22px;
  height: 22px;
  padding: 0 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid var(--white);
  border-radius: 999px;
  color: var(--white);
  background: #ff3b30;
  font-size: 12px;
  font-weight: 800;
  line-height: 1;
  animation: wa-badge 4s ease-in-out 2s infinite;
}

/* Globo de texto */
.whatsapp-float__label {
  position: relative;
  padding: 11px 16px;
  border-radius: 14px;
  color: var(--text);
  background: var(--white);
  box-shadow: 0 12px 30px rgba(4, 16, 30, 0.18);
  font-size: 14px;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transform: translateX(12px) scale(0.92);
  transform-origin: right center;
  transition:
    opacity 0.3s ease,
    transform 0.3s ease;
}

/* El script añade esta clase unos segundos después de cargar la página */
.whatsapp-float--show-label .whatsapp-float__label {
  opacity: 1;
  transform: none;
  animation: wa-label-bounce 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.whatsapp-float__label strong {
  color: #128c7e;
}

/* Flechita del globo */
.whatsapp-float__label::after {
  content: "";
  position: absolute;
  top: 50%;
  right: -6px;
  width: 12px;
  height: 12px;
  background: var(--white);
  transform: translateY(-50%) rotate(45deg);
  border-radius: 2px;
}

.whatsapp-float:hover .whatsapp-float__label,
.whatsapp-float:focus-visible .whatsapp-float__label {
  opacity: 1;
  transform: none;
}

.whatsapp-float:hover .whatsapp-float__button {
  transform: scale(1.08) rotate(-6deg);
  box-shadow: 0 16px 34px rgba(18, 140, 126, 0.55);
}

.whatsapp-float:active .whatsapp-float__button {
  transform: scale(0.94);
}

.whatsapp-float:focus-visible {
  outline: none;
}

.whatsapp-float:focus-visible .whatsapp-float__button {
  outline: 3px solid var(--white);
  outline-offset: 4px;
}

@keyframes wa-enter {
  from {
    opacity: 0;
    transform: translateY(40px) scale(0.6);
  }

  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes wa-ripple {
  0% {
    opacity: 0.6;
    transform: scale(1);
  }

  100% {
    opacity: 0;
    transform: scale(1.9);
  }
}

@keyframes wa-shake {
  0%,
  70%,
  100% {
    transform: rotate(0) scale(1);
  }

  74% {
    transform: rotate(-18deg) scale(1.15);
  }

  78% {
    transform: rotate(16deg) scale(1.15);
  }

  82% {
    transform: rotate(-12deg) scale(1.1);
  }

  86% {
    transform: rotate(8deg) scale(1.05);
  }

  90% {
    transform: rotate(0) scale(1);
  }
}

@keyframes wa-badge {
  0%,
  70%,
  100% {
    transform: scale(1);
  }

  76% {
    transform: scale(1.35);
  }

  82% {
    transform: scale(0.9);
  }

  88% {
    transform: scale(1.1);
  }
}

@keyframes wa-label-bounce {
  0% {
    opacity: 0;
    transform: translateX(14px) scale(0.85);
  }

  100% {
    opacity: 1;
    transform: none;
  }
}


/* =====================================================
   ANIMACIONES AL DESLIZAR
   (solo se activan si el navegador permite movimiento;
   la clase .motion la añade el script)
===================================================== */

:root {
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
}

/* Scroll suave con Lenis */
html.lenis,
html.lenis body {
  height: auto;
}

.lenis.lenis-smooth {
  scroll-behavior: auto !important;
}

.lenis.lenis-smooth [data-lenis-prevent] {
  overscroll-behavior: contain;
}

.lenis.lenis-stopped {
  overflow: hidden;
}


/* Barra de progreso */

.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 200;
  width: 100%;
  height: 3px;
  pointer-events: none;
  background: linear-gradient(90deg, var(--secondary), var(--accent), var(--success));
  transform: scaleX(0);
  transform-origin: 0 50%;
}


/* Fondo cuadriculado del hero se mueve más lento (parallax) */

.hero::after {
  background-position: 0 var(--grid-shift, 0);
}

.hero__content > div,
.contact-card {
  will-change: transform;
}


/* ---------- Entradas (subir / escalar) ---------- */

.motion .reveal {
  opacity: 0;
  transition:
    opacity 0.9s var(--ease-out) var(--delay, 0s),
    translate 1.1s var(--ease-out) var(--delay, 0s),
    scale 1.1s var(--ease-out) var(--delay, 0s),
    filter 0.9s var(--ease-out) var(--delay, 0s),
    transform 0.25s ease,
    box-shadow 0.25s ease,
    border-color 0.25s ease,
    background-color 0.25s ease;
}

.motion .reveal--up {
  translate: 0 48px;
  filter: blur(8px);
}

.motion .reveal--scale {
  translate: 0 70px;
  scale: 0.9;
}

.motion .reveal.is-visible {
  opacity: 1;
  translate: none;
  scale: none;
  filter: none;
}


/* ---------- Títulos letra por letra ---------- */

.split-word {
  display: inline-block;
  white-space: nowrap;
}

.split-char {
  display: inline-block;
  overflow: hidden;
  /* espacio para letras con colita (g, p, y) */
  padding-bottom: 0.14em;
  margin-bottom: -0.14em;
  vertical-align: top;
}

.split-char__inner {
  display: inline-block;
  translate: 0 115%;
  rotate: 8deg;
  transform-origin: 0 100%;
  transition:
    translate 1s var(--ease-out),
    rotate 1s var(--ease-out);
  transition-delay: calc(var(--delay, 0s) + min(calc(var(--i) * 0.024s), 0.9s));
}

.split-title.is-visible .split-char__inner {
  translate: none;
  rotate: none;
}


/* ---------- Letras que ruedan en el menú ---------- */

.roll-word {
  display: inline-block;
  white-space: nowrap;
}

.roll-char {
  display: inline-block;
  overflow: hidden;
  height: 1.25em;
  line-height: 1.25em;
  vertical-align: top;
}

.roll-char__inner {
  display: inline-block;
  position: relative;
  transition: translate 0.45s var(--ease-out);
  transition-delay: calc(var(--i) * 0.022s);
}

.roll-char__inner::after {
  content: attr(data-char);
  position: absolute;
  top: 100%;
  left: 0;
  color: var(--secondary);
}

.roll-link:hover .roll-char__inner,
.roll-link:focus-visible .roll-char__inner {
  translate: 0 -100%;
}


/* ---------- Párrafos que se iluminan palabra por palabra ---------- */

.motion .hl-word {
  opacity: 0.16;
}


/* ---------- Cinta de servicios ---------- */

.marquee {
  position: relative;
  overflow: hidden;
  padding: 26px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--white);
  background: var(--primary-dark);
}

.marquee::before,
.marquee::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  z-index: 2;
  width: min(120px, 12vw);
  pointer-events: none;
}

.marquee::before {
  left: 0;
  background: linear-gradient(90deg, var(--primary-dark), transparent);
}

.marquee::after {
  right: 0;
  background: linear-gradient(-90deg, var(--primary-dark), transparent);
}

.marquee__track {
  display: flex;
  width: max-content;
  will-change: transform;
}

.marquee__group {
  display: flex;
  flex-shrink: 0;
  align-items: center;
}

.marquee__item {
  padding: 0 28px;
  font-size: clamp(1.6rem, 4.2vw, 3.4rem);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -1px;
  white-space: nowrap;
  text-transform: uppercase;
}

/* Un servicio sí y otro no, con letras de contorno */
.marquee__item:nth-of-type(4n + 3) {
  color: transparent;
  -webkit-text-stroke: 1.5px var(--accent-light);
}

.marquee__sep {
  color: var(--accent);
  font-size: clamp(1rem, 2.4vw, 1.8rem);
}

/* Sin JavaScript o con movimiento reducido: la cinta se mueve sola con CSS */
html:not(.motion) .marquee__track {
  animation: marquee-fallback 40s linear infinite;
}

@keyframes marquee-fallback {
  to {
    transform: translateX(-50%);
  }
}

@media (max-width: 620px) {
  .marquee {
    padding: 18px 0;
  }

  .marquee__item {
    padding: 0 18px;
  }

  .marquee__item:nth-of-type(4n + 3) {
    -webkit-text-stroke-width: 1px;
  }

  .motion .reveal--up {
    translate: 0 32px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html:not(.motion) .marquee__track {
    animation: none;
  }

  .scroll-progress {
    transition: none;
  }
}


/* =====================================================
   PANTALLAS GRANDES
===================================================== */

@media (min-width: 1400px) {
  .carousel {
    width: min(100%, 1060px);
  }
}


/* =====================================================
   TABLETAS Y PANTALLAS MEDIANAS
===================================================== */

@media (max-width: 1000px) {
  .brand__logo {
    height: 46px;
  }

  .navbar__links {
    gap: 18px;
  }

  .hero__content {
    gap: 32px;
  }

  .services-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}


/* =====================================================
   MENÚ MÓVIL Y TABLETAS
===================================================== */

@media (max-width: 820px) {
  html {
    scroll-padding-top: 80px;
  }

  .navbar {
    min-height: 72px;
  }

  .brand__logo {
    height: 44px;
  }

  .navbar__toggle {
    display: inline-flex;
  }

  .navbar__links {
    position: absolute;
    top: calc(100% + 1px);
    right: 0;
    left: 0;
    padding: 12px;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 6px;
    border: 1px solid var(--line);
    border-top: 0;
    border-radius: 0 0 18px 18px;
    background: rgba(255, 255, 255, 0.99);
    box-shadow: 0 18px 35px rgba(4, 16, 30, 0.14);
    /* Oculto con animación suave */
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition:
      opacity 0.2s ease,
      transform 0.2s ease,
      visibility 0s linear 0.2s;
  }

  .navbar__links.navbar__links--open {
    opacity: 1;
    visibility: visible;
    transform: none;
    transition:
      opacity 0.2s ease,
      transform 0.2s ease,
      visibility 0s;
  }

  .navbar__link {
    display: flex;
    min-height: 46px;
    padding: 10px 12px;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    font-size: 15px;
  }

  .navbar__link:hover {
    background: var(--surface-soft);
  }

  .hero__content,
  .about-grid,
  .contact-banner {
    grid-template-columns: 1fr;
  }

  .hero__content {
    min-height: auto;
    padding: 68px 0;
  }

  .services-cta {
    align-items: flex-start;
    flex-direction: column;
  }

  .projects {
    margin-top: 52px;
  }

  .carousel__slide,
  .carousel__empty {
    aspect-ratio: 4 / 3;
  }

  .carousel__button {
    width: 44px;
    height: 44px;
    font-size: 1.2rem;
  }

  .carousel__button--previous {
    left: 12px;
  }

  .carousel__button--next {
    right: 12px;
  }
}


/* =====================================================
   CELULARES
===================================================== */

@media (max-width: 620px) {
  .page {
    width: min(100% - 24px, 1160px);
  }

  .navbar {
    min-height: 66px;
    gap: 12px;
  }

  .brand__logo {
    height: 40px;
  }

  .hero__content {
    padding: 48px 0 52px;
  }

  .hero__badge {
    font-size: 11px;
  }

  .hero__title {
    margin-top: 18px;
    font-size: clamp(2.3rem, 11vw, 3.2rem);
    letter-spacing: -1.5px;
  }

  .hero__description {
    font-size: 16px;
    line-height: 1.65;
  }

  .hero__actions,
  .contact-banner__actions {
    width: 100%;
    flex-direction: column;
  }

  .hero__actions .button,
  .contact-banner__actions .button,
  .services-cta .button {
    width: 100%;
  }

  .contact-card {
    padding: 22px 18px;
    border-radius: 22px;
  }

  .contact-card__title {
    font-size: 25px;
  }

  .contact-item {
    padding: 12px;
  }

  .contact-item__icon {
    width: 38px;
    height: 38px;
    flex-basis: 38px;
  }

  .section,
  .contact-section {
    padding: 60px 0;
  }

  .section__header {
    margin-bottom: 26px;
  }

  .section__title {
    letter-spacing: -1px;
  }

  .section__description {
    font-size: 16px;
  }

  .about-grid,
  .services-grid {
    grid-template-columns: 1fr;
  }

  .services-grid {
    gap: 14px;
  }

  .about-card,
  .values-card,
  .service-card {
    padding: 24px 20px;
  }

  .service-card {
    min-height: auto;
  }

  .services-cta {
    padding: 22px 20px;
  }

  .contact-banner {
    padding: 28px 20px;
    gap: 24px;
    border-radius: 22px;
  }

  /* Carrusel en celular: formato más alto para fotos verticales */
  .carousel {
    border-radius: 18px;
  }

  .carousel__slide,
  .carousel__empty {
    aspect-ratio: 4 / 5;
  }

  .carousel__button {
    width: 40px;
    height: 40px;
    font-size: 1.05rem;
    background: rgba(4, 16, 30, 0.5);
  }

  .carousel__button--previous {
    left: 8px;
  }

  .carousel__button--next {
    right: 8px;
  }

  .carousel__counter {
    top: 12px;
    right: 12px;
    font-size: 12px;
  }

  .carousel__indicators {
    bottom: 12px;
    max-width: calc(100% - 32px);
    gap: 6px;
  }

  .carousel__indicator {
    width: 9px;
    height: 9px;
  }

  .carousel__indicator--active,
  .carousel__indicator--active:hover {
    width: 24px;
  }

  .site-footer {
    /* Espacio para que el botón flotante no tape el texto */
    padding-bottom: 96px;
  }

  .site-footer__content {
    align-items: center;
    flex-direction: column;
    text-align: center;
  }

  .whatsapp-float {
    right: max(16px, env(safe-area-inset-right));
    bottom: max(16px, env(safe-area-inset-bottom));
  }

  .whatsapp-float__button {
    width: 56px;
    height: 56px;
    flex-basis: 56px;
  }

  .whatsapp-float__button .bi {
    font-size: 1.75rem;
  }

  .whatsapp-float__label {
    padding: 9px 13px;
    font-size: 13px;
  }
}


/* =====================================================
   DISPOSITIVOS MUY PEQUEÑOS
===================================================== */

@media (max-width: 380px) {
  .page {
    width: min(100% - 18px, 1160px);
  }

  .brand__logo {
    height: 36px;
  }

  .hero__title {
    font-size: 2.15rem;
  }

  .hero__badge {
    font-size: 10.5px;
  }

  .carousel__slide,
  .carousel__empty {
    aspect-ratio: 1 / 1;
  }

  .whatsapp-float__label {
    display: none;
  }
}


/* =====================================================
   CELULARES EN HORIZONTAL (poca altura)
===================================================== */

@media (max-height: 500px) and (orientation: landscape) {
  .carousel {
    width: min(100%, 140vh);
  }

  .carousel__slide,
  .carousel__empty {
    aspect-ratio: 16 / 9;
  }

  .hero__content {
    padding: 40px 0;
  }
}


/* =====================================================
   DISPOSITIVOS TÁCTILES (sin efecto hover pegado)
===================================================== */

@media (hover: none) {
  .service-card:hover,
  .button:hover {
    transform: none;
  }

  .carousel__button:hover {
    background: rgba(4, 16, 30, 0.6);
    transform: translateY(-50%);
  }
}


/* =====================================================
   REDUCCIÓN DE MOVIMIENTO
===================================================== */

@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;
  }

  .whatsapp-float__button::before,
  .whatsapp-float__button::after {
    display: none;
  }
}
